Skip to main content

ScrollBarAnnotationOptions Class

Contains settings for scroll bar annotations.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.2.dll

NuGet Package: DevExpress.Charts

#Declaration

public class ScrollBarAnnotationOptions :
    ChartElement

The following members return ScrollBarAnnotationOptions objects:

#Remarks

Scroll bar annotations (not to be confused with Annotations) are colored marks that reflect the position of different chart elements on a scroll bar. To display scroll bars, zoom into a chart or enable the ScrollBarOptions.XAxisScrollBarVisible and ScrollBarOptions.YAxisScrollBarVisible properties.

To allow users to zoom in/out of a chart, enable the following options:

Refer to Zoom and Scroll in 2D XY-Charts for more information on navigation capabilities in charts.

The Chart Control supports scroll bar annotations for the following elements:

Element Scroll bar annotation visibility
Constant lines ShowConstantLines
Strips ShowStrips
Custom axis labels ShowCustomLabels
Series point annotations ShowSeriesPointAnnotations
Pane annotations ShowPaneAnnotations

#Example

Use the ScrollBarOptions.XAxisAnnotationOptions property to access the scroll bar annotation settings for x-axes. Use ScrollBarOptions.YAxisAnnotationOptions for y-axes.

XYDiagram diagram = chartControl1.Diagram as XYDiagram;

diagram.EnableAxisXScrolling = true;
diagram.EnableAxisXZooming = true;
ScrollBarAnnotationOptions xAxisScrollBarOptions = diagram.DefaultPane.ScrollBarOptions.XAxisAnnotationOptions;
xAxisScrollBarOptions.ShowConstantLines = true;
xAxisScrollBarOptions.ShowStrips = true;
xAxisScrollBarOptions.ShowCustomLabels = false;
xAxisScrollBarOptions.ShowPaneAnnotations = false;
xAxisScrollBarOptions.ShowSeriesPointAnnotations = true;

diagram.EnableAxisYScrolling = true;
diagram.EnableAxisYZooming = true;
ScrollBarAnnotationOptions yAxisScrollBarOptions = diagram.DefaultPane.ScrollBarOptions.YAxisAnnotationOptions;
yAxisScrollBarOptions.ShowConstantLines = true;
yAxisScrollBarOptions.ShowStrips = true;
yAxisScrollBarOptions.ShowCustomLabels = false;
yAxisScrollBarOptions.ShowPaneAnnotations = false;
yAxisScrollBarOptions.ShowSeriesPointAnnotations = true;

#Inheritance

Object
ChartElement
ScrollBarAnnotationOptions
See Also