ChartDirector 6.2 (.NET Edition)

WPFChartViewer


The WPFChartViewer control is a WPF control for viewing ChartDirector charts. It is a subclass of the WPF Canvas. Apart from displaying the charts, its main functions are to support advanced user interactions with the charts, including:

WPFChartViewer Members

The followings are members specific to the WPFChartViewer control. Members inherited from the WPF Canvas are omitted. Please refer to Microsoft documentation for members of the WPF Canvas.

Properties
NameDescription
ChartGets or sets a BaseChart object to be used with the WPFChartViewer.
ChartSizeModeDetermine the sizing method of the chart image.
ImageMapGets or sets the image map that defines the hot spots on the chart image.
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.
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.Windows.Media.Color.
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.Controls.Canvas 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.Controls.Canvas 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.
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.
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 WPFChartViewer.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.Controls.Canvas are omitted.