Back to Devexpress

XYDiagram2D.SetAxisXZoomRatio(Double) Method

wpf-devexpress-dot-xpf-dot-charts-dot-xydiagram2d-dot-setaxisxzoomratio-x28-system-dot-double-x29.md

latest2.2 KB
Original Source

XYDiagram2D.SetAxisXZoomRatio(Double) Method

Changes the current zoom value for the X-axis to the specified zoom ratio.

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public void SetAxisXZoomRatio(
    double ratio
)
vb
Public Sub SetAxisXZoomRatio(
    ratio As Double
)

Parameters

NameTypeDescription
ratioDouble

A Double value that specifies a new zoom ratio. It should be greater than 0 and less than or equal to 1.

|

Remarks

Use the SetAxisXZoomRatio and XYDiagram2D.SetAxisYZoomRatio methods to change the current zoom value for the X and Y axes of the XYDiagram2D.

Note that the ratio parameter, which should be passed to these methods, can be set to any double value from 0 (no zoom) to 1 (the maximum zoom value).

csharp
XYDiagram2D diagram = (XYDiagram2D)chart.Diagram;
diagram.SetAxisXZoomRatio(0.25);
diagram.SetAxisYZoomRatio(0.25);
vb
Dim diagram As XYDiagram2D = CType(chart.Diagram, XYDiagram2D)
diagram.SetAxisXZoomRatio(0.25)
diagram.SetAxisYZoomRatio(0.25)

See Also

EnableAxisXNavigation

EnableAxisYNavigation

XYDiagram2D Class

XYDiagram2D Members

DevExpress.Xpf.Charts Namespace