In typical usage, the WPFViewPortControl displays an "overall chart" that shows the full data range, and connects to the WPFChartViewer using WPFViewPortControl.Viewer. It can then include a rectangle on the overall chart to represent the viewport in the WPFChartViewer. The region outside the rectangle can be dimmed out to highlight the viewport region. If the viewport is changed (such as if the user uses the mouse wheel to zoom in the chart), the rectangle will update automatically.
To manipulate the viewport, the user can drag the rectangle to move the viewport (equivalent to scrolling). The user can also resize the viewport by dragging the border of the rectangle (equivalent to zooming), or drag a new rectangular region on the overall chart to be used as the new viewport, or click on a point on the chart to center the viewport at that point.
Properties
Name | Description |
---|---|
Chart | Gets or sets the BaseChart object for displaying in the control. The chart usually is an overall chart that includes the full data range. |
Viewer | Gets or Sets the WinChartViewer object to be associated with the WinViewPortControl. |
ChartSizeMode | Determine the sizing method of the chart image. |
DragInsideToMove | Enables or disables dragging inside the viewport to move it. |
DragBorderToResize | Enables or disables dragging the viewport border to resize it. |
DragOutsideToSelect | Enables or disables dragging outside the viewport to select a new viewport. |
ClickToCenter | Enables or disables centering the viewport at the clicked point. |
ViewPortExternalColor | Gets or sets the fill color for the region outside the viewport. |
ViewPortBorderColor | Gets or sets the viewport border color. |
ViewPortBorderWidth | Gets or sets the viewport border width. |
ViewPortFillColor | Gets or sets the fill color for the region inside the viewport. |
SelectionBorderColor | Gets or sets the border color of the selection box. |
SelectionBorderWidth | Gets or sets the border width of the selection box. |
Note: Properties inherited from System.Windows.Controls.Canvas are omitted. |
Methods
Name | Description |
---|---|
setCursor | Sets the mouse cursors to be used at various parts of the control. |
setMouseMargin | Sets the margin around the viewport border for mouse drag. |
updateDisplay | Updates the display. |
setDPI | Sets the DPI (scale factor) of the chart on the screen. |
getDPI | Gets the DPI (scale factor) of the chart on the screen. |
Note: Methods inherited from System.Windows.Controls.Canvas are omitted. |
Events
Name | Description |
---|---|
Note: Events inherited from System.Windows.Controls.Canvas are omitted. |