Dundas Chart for Windows Forms
AxisDataView Class
Members  See Also  Send comments on this topic.
DundasWinChart Assembly > Dundas.Charting.WinControl Namespace : AxisDataView Class


Provides data view functionality for the Chart control.


AxisDataView class represents an axis data view. It allows to display only part of the avilable data.

Syntax

Visual Basic (Declaration)  
Public Class AxisDataView 
Visual Basic (Usage) Copy Code
Dim instance As AxisDataView
C#  
public class AxisDataView 

Remarks

This class represents a data view, and is exposed using the Axis.View property. A data view is a "view" of data that has a start position (represented by the Position property) and a size (represented by the Size property). See Figure 1 below.
 


  Figure 1: Size and position of a data view

Views always belong to an axis, and a view can result from either user interaction or by calling the Zoom or Scroll methods. User interaction, accomplished using range selection along an axis using the mouse, is possible if the UserSelection property of the chart area's cursor property is set to true. The end-user selects a range by left-clicking the mouse and dragging the mouse, and when the mouse button is released the selected range is then displayed as a view. 

To be able to zoom in on data the Zoomable property must be true.

Note that when end-users zoom in on data the previous view state is automatically saved. This differs from zooming using the Zoom method, which does not save the previous view state unless the saveState parameter for one of the method definitions is set to true.

Views can be reset by the end-user by clicking on the ZoomReset button (refer to Figure 2 below for a pictorial representation of a scrollbar and its elements), and clicking on this button results in the previous view being displayed. Note that in the image below the view along the X axis has a position of 1, and a size of 5.
 


   Figure 2: Elements of a scrollbar.

Axis label intervals (as well as tick mark and grid intervals) are recalculated automatically when zooming occurs, and ignore any previous interval-related property settings. To control how labels are displayed when the end-user zooms on data use the Axis.LabelStyle property.

There are two main types of scrolling: large scrolling, which occurs when the end user clicks in the background of a scrollbar (i.e. that part of a scrollbar not covered by the thumb); and small scrolling, which occurs when the end user clicks on a left/right or up/down button. To control the intervals of large and small scrolling use the Size and SmallScrollSize properties of this class, respectively. Large and small scrolling can also be accomplished programmatically using the Scroll method.

The MinSize and SmallScrollMinSize properties can be used to limit large and small scrolling that occurs as a result of end-user interaction. However, note that these properties will only have an effect if the Size and SmallScrollSize properties have not been set to an explicit value.

When large scrolling occurs the scrolling size equals the view size. For example, if a view is 5 days, then clicking on the background of the scrollbar will result in 5 days being scrolled in the direction of the mouse click. To explicitly set the large scrolling size override one of the ScrollBar events (e.g. Page_Down or Page_Up) and set the view size and position using the Position, Size and SizeType properties.

If the SmallScrollSize property is not set (i.e. it is a Double.NaN value) then the small scrolling size is automatically recalculated every time the end-user zooms in on data. You can then use SmallScrollMinSize to then set the smallest allowable amount of small scrolling that can occur, regardless of how often the end user has zoomed in on the data.

Inheritance Hierarchy

System.Object
   Dundas.Charting.WinControl.AxisDataView

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2009 All Rights Reserved.