Axis Scroll Events

AxisScroll events are provided for the C1Chart and AxisScrollBar objects to use when you need to determine more information on axis scrolling. For example, using the AxisScroll events you can provide detailed information about which axis is being scrolled, what value the min and max values are before and after scrolling through the data, what type of scrolling is being performed, and the orientation of the scrollbar.

The sender in the AxisScroll event can be either the AxisScrollBar object or the c1Chart1 object. If both the Chart and the AxisScrollBar events are set, the AxisScrollBar event fires first. However, the AxisScroll event fires for all axes, and sets the AxisId property of the AxisScrollEventArgs object to indicate the axis that changed.

The AxisScrollEventArgs class provides data for the AxisScrollEvent which fires whenever the built-in axis scrollbar changes value.

The following table provides information on the AxisScrollEventArgs properties:

 

Property

Descriptioin

AxisID

An enumeration value that identifies the axis being scrolled.

NewValue

Gets or sets the value of the axis scrollbar as it will be after event completion. The axis scrollbar value indicates the fraction between the minimum and maximum.

OldValue

Gets the value of the axis scrollbar before the event. The axis scrollbar value indicates the fraction between the minimum and maximum.

ScrollEventType

Gets a value indicating the type of scroll event such as ThumbPosition, ThumbTrack, EndScroll, LargeIncrement, SmallIncrement, etc.

ScrollOrientation

Gets a value indicating the orientation of the axis scrollbar.

 

The following example demonstrates how to reference all of the properties from the AxisScrollEventArgs class using the AxisScroll event:

      Visual Basic

      C#

The code outputs the AxisScroll event data similar to the following:


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.