Axis2D.VisualRange Property

Gets or sets the settings that specify the visible range of the axis coordinates.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v21.1.dll


public Range VisualRange { get; set; }

Property Value

Type Description

A Range object which contains the common visual range settings of the axis coordinates.


The VisualRange property is used in descendants of the AxisBase class. The primary settings exposed via the properties of the Range class allow you to specify, for example, the minimum and maximum axis values (see the Range.MinValue and Range.MaxValue properties).


The following markup shows how to specify visual and whole ranges:

            <dxc:Range MinValue="05/24/2016" 
            <dxc:Range MinValue="06/18/2016" 

The markup above uses the following classes and properties:

Class or Property Description
Axis.WholeRange Gets or sets the axis whole range’s settings.
Axis2D.VisualRange Gets or sets the axis visual range’s settings.
Range The axis range.
Range.MinValue The range’s minimum limit.
Range.MaxValue The range’s maximum limit.

You can call the Range.SetMinMaxValues method to limit a range at runtime. The following code customizes an x-axis’s visual range:

using DevExpress.Xpf.Charts;

private void Window_Loaded(object sender, RoutedEventArgs e) {
    Range visualRange = ((XYDiagram2D)chartControl1.Diagram).ActualAxisX.ActualVisualRange;
    visualRange.SetMinMaxValues(minValue: new DateTime(2019, 4, 1), maxValue: new DateTime(2019, 10, 1));
See Also