corelibraries-devexpress-dot-xtracharts-e466a73c.md
Contains settings for scroll bar annotations.
Namespace : DevExpress.XtraCharts
Assembly : DevExpress.XtraCharts.v25.2.dll
NuGet Package : DevExpress.Charts
public class ScrollBarAnnotationOptions :
ChartElement
Public Class ScrollBarAnnotationOptions
Inherits ChartElement
The following members return ScrollBarAnnotationOptions objects:
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.
This image shows scroll bar annotations for various elements.
Scroll bar annotations are not displayed when a scroll bar is hidden.
To allow users to zoom in/out of a chart, enable the following options:
XYDiagram2D.EnableAxisXZooming (XYDiagramPaneBase.EnableAxisXZooming)
XYDiagram2D.EnableAxisXScrolling (XYDiagramPaneBase.EnableAxisXScrolling)
XYDiagram2D.EnableAxisYZooming (XYDiagramPaneBase.EnableAxisYZooming)
XYDiagram2D.EnableAxisYScrolling (XYDiagramPaneBase.EnableAxisYScrolling)
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:
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;
Dim diagram As XYDiagram = TryCast(chartControl1.Diagram, XYDiagram)
diagram.EnableAxisXScrolling = True
diagram.EnableAxisXZooming = True
Dim xAxisScrollBarOptions As ScrollBarAnnotationOptions = 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
Dim yAxisScrollBarOptions As ScrollBarAnnotationOptions = diagram.DefaultPane.ScrollBarOptions.YAxisAnnotationOptions
yAxisScrollBarOptions.ShowConstantLines = True
yAxisScrollBarOptions.ShowStrips = True
yAxisScrollBarOptions.ShowCustomLabels = False
yAxisScrollBarOptions.ShowPaneAnnotations = False
yAxisScrollBarOptions.ShowSeriesPointAnnotations = True
Object ChartElement ScrollBarAnnotationOptions
See Also