ChartDirector 6.2 (.NET Edition)

WinChartViewer


The WinChartViewer control is a Windows Forms control for viewing ChartDirector charts. It is a subclass of the .NET PictureBox control. Apart from displaying the charts, its main functions are to support advanced user interactions with the charts, including:

WinChartViewer Members

The followings are members specific to the WinChartViewer control. Members inherited from the .NET PictureBox control are omitted. Please refer to Microsoft documentation for members of the .NET PictureBox control.

Properties
NameDescription
ChartGets or sets a BaseChart object to be used with the WinChartViewer.
ImageGets or sets the chart image to view.
ChartSizeModeDetermine the sizing method of the chart image.
ImageMapGets or sets the image map that defines the hot spots on the chart image.
DefaultToolTipGets or sets the tool tip to display when the mouse is over the WinChartViewer control but not over a hot spot. If the mouse cursor is over a hot spot, the tool tip specified in the image map will be displayed instead.
AutomaticDelayGets or sets the automatic delay (in milliseconds) of the tool tip.
AutoPopDelayGets or sets the period of time (in milliseconds) that the tool tip remains visible if the mouse cursor is stationary.
InitialDelayGets or sets the period of time (in milliseconds) that passes before the tool tip appears.
ReshowDelayGets or sets the length of time (in milliseconds) that must transpire before subsequent tool tip windows can appear as the mouse cursor moves from one tool tip location to another.
ChartMouseXGets the mouse x-coordinate in the chart pixel coordinate system.
ChartMouseYGets the mouse y-coordinate in the chart pixel coordinate system.
PlotAreaMouseXGets the mouse x-coordinate on the plot area in the chart pixel coordinate system.
PlotAreaMouseYGets the mouse y-coordinate on the plot area in the chart pixel coordinate system.
ViewPortLeftGets or sets the position of the left side of the viewport.
ViewPortTopGets or sets the position of the top side of the viewport.
ViewPortWidthGets or sets the width of the viewport.
ViewPortHeightGets or sets the height of the viewport.
MouseUsageGets or sets the mouse usage mode.
ZoomDirectionGets or sets the zoom direction for mouse zoom in/out actions.
ScrollDirectionGets or sets the scroll direction for mouse scroll actions.
ZoomInRatioGets or sets the magnification ratio for each zoom in click of the mouse.
ZoomOutRatioGets or sets the magnification ratio for each zoom out click of the mouse.
MouseWheelZoomRatioGets or sets the magnification ratio for each mouse wheel event.
MouseWheelAutoFocusDetermines whether to automatically grab the focus to support mouse wheel zooming.
ZoomInWidthLimitGets or sets the viewport width at maximum zoom in.
ZoomOutWidthLimitGets or sets the viewport width at maximum zoom out.
ZoomInHeightLimitGets or sets the viewport height at maximum zoom in.
ZoomOutHeightLimitGets or sets the viewport height at maximum zoom out.
MinimumDragGets or sets the minimum mouse drag distance before it is considered as an intentional drag.
SelectionBorderWidthGets or sets the border width of the zoom selection box.
SelectionBorderColorGets or sets the border color of the zoom selection box as a System.Drawing.Color.
CursorGets or sets the cursor that is displayed when the mouse cursor is over the WinChartViewer control but not over a normal hot spot. If the mouse cursor is over a normal hot spot, the WinChartViewer.HotSpotCursor will be displayed instead.
HotSpotCursorGets or sets the cursor that is displayed when the mouse cursor is over a normal hot spot.
ZoomInCursorGets or sets the mouse cursor to be used when the mouse is used for zoom in.
ZoomOutCursorGets or sets the mouse cursor to be used when the mouse is used for zoom out.
NoZoomCursorGets or sets the mouse cursor to be used when the mouse is used for zoom in/out, but the zoom in/out limits has been reached.
ScrollCursorGets or sets the mouse cursor to be used when the mouse is used for scrolling.
UpdateIntervalGets or sets the minimum gap interval between two ViewPortChanged events in milliseconds.
IsMouseOnPlotAreaChecks if the mouse cursor is on the extended plot area.
IsMouseDraggingChecks if the mouse is dragging on the plot area.
IsInMouseMoveEventChecks if the current code is executing in a MouseMoveChart or MouseMovePlotArea event.
IsInViewPortChangedEventChecks if the current code is executing in a ViewPortChanged event.
Note: Properties inherited from System.Windows.Forms.PictureBox are omitted.

Methods
NameDescription
setPlotAreaMouseMarginSets all margins (left, right, top, and bottom) of the plot area mouse event region to the same value.
setPlotAreaMouseMargin2Sets the margins of the plot area mouse event region.
removeDynamicLayerCalls BaseChart.removeDynamicLayer when the specified event occurs.
updateDisplayUpdates the display.
validateViewPortEnsures the viewport left, top, width and height are within valid ranges and adjusts them if necessary.
updateViewPortTriggers the ViewPortChanged event.
setFullRangeDefines the full range of a viewport data scale.
updateFullRangeHUpdates the full range of a horizontal viewport data scale.
updateFullRangeVUpdates the full range of a vertical viewport data scale.
getValueAtViewPortConverts a viewport coordinate to a value of the specified data scale.
getViewPortAtValueConverts a value of the specified data scale to a viewport coordinate.
syncLinearAxisWithViewPortSynchronizes a linear Axis with the part of the data scale in viewport.
syncLogAxisWithViewPortSynchronizes a logarithmic Axis with the part of the data scale in viewport.
syncDateAxisWithViewPortSynchronizes a date/time Axis with the part of the data scale in viewport.
Note: Methods inherited from System.Windows.Forms.PictureBox are omitted.

Events
NameDescription
MouseMoveChartThis event occurs when the mouse cursor moves over the chart.
MouseLeaveChartThis event occurs when the mouse cursor leaves the chart.
MouseMovePlotAreaThis event occurs when the mouse cursor moves over the extended plot area.
MouseLeavePlotAreaThis event occurs when the mouse cursor leaves the extended plot area.
ClickHotSpotThis event occurs when the mouse clicks on a hot spot on the chart image.
DoubleClickHotSpotThis event occurs when the mouse double clicks on a hot spot on the chart image.
MouseEnterHotSpotThis event occurs when the mouse cursor enters a hot spot on the chart image.
MouseMoveHotSpotThis event occurs when the mouse cursor moves over a hot spot on the chart image.
MouseHoverHotSpotThis event occurs when the mouse cursor hovers a hot spot on the chart image.
MouseLeaveHotSpotThis event occurs when the mouse cursor leaves a hot spot on the chart image.
MouseDownHotSpotThis event occurs when the mouse cursor is over a hot spot on the chart image and the mouse button is pressed.
MouseUpHotSpotThis event occurs when the mouse cursor is over a hot spot on the chart image and the mouse button is released.
ViewPortChangedThis event occurs when the viewport is changed through mouse actions, or when WinChartViewer.updateViewPort is called.
SelectionChangedThis event occurs when the user is selecting a region on the chart using "drag to select" mouse actions.
Note: Events inherited from System.Windows.Forms.PictureBox are omitted.