Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

XYDiagram2D.ScrollHorizontally(Int32) Method

Scrolls a diagram by value in pixels in the horizontal direction.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v24.2.dll

NuGet Package: DevExpress.Wpf.Charts

#Declaration

public void ScrollHorizontally(
    int dx
)

#Parameters

Name Type Description
dx Int32

An integer value that specifies a shift in pixels.

#Remarks

The following code scrolls the diagram by 50px horizontally:

XYDiagram2D diagram = (XYDiagram2D)chart.Diagram;
diagram.ScrollHorizontally(50);

To verify whether it is possible to scroll a diagram horizontally, call the XYDiagram2D.CanScrollHorizontally method.

See Also