[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Collapse]Charts Suite
   [Collapse]Chart Control
    [Expand]Getting Started
    [Expand]Fundamentals
    [Expand]Providing Data
    [Collapse]Chart Elements
     [Expand]Diagram
     [Expand]Series
     [Expand]Panes
     [Collapse]Axes
       Primary and Secondary Axes
       Axis Scale Types
       Whole and Visual Ranges
       Axis Layout and Appearance
       Axis Labels
       Axis Titles
       Constant Lines
       Strips
       Scale Breaks
       Tickmarks, Grid Lines, and Interlacing
      Legends
      Chart Titles
      Annotations
    [Expand]Appearance Customization
    [Expand]End-User Features
    [Expand]Design-Time Features
    [Expand]Examples
    [Expand]Additional Resources
   [Expand]Chart3D Control
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Whole and Visual Ranges

Whole and visual axis ranges define which data an axis displays. The whole range is automatically calculated based on the data of all series associated with the axis. A chart does not show values that are outside the range. A visual range is equal to a whole range by default and determines the data range the Chart control currently displays.

An x-axis's visual range is equal to a whole range An x-axis's visual range is less than a whole range
Note

The following axes types allow you to operate with their whole or visual ranges:

This document consists of the following sections:

Expanded How End User Can Change a Visual Range

An end user changes a visual range when zooming and scrolling a chart. Note that, changing the visual range does not affect the whole range.

Use the markup below to enable scrolling and zooming in a chart:

The code uses the following classes and properties:

Class or Property Description
XYDiagram2D The XY Diagram.
XYDiagram2D.EnableAxisXNavigation Specifies whether an end user can scroll and zoom a chart's x-axis.
XYDiagram2D.EnableAxisYNavigation Specifies whether an end user can scroll and zoom a chart's y-axis.

Expanded How to Configure Visual and Whole Ranges

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

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.

Expanded How to Specify Diagram Side Margins

You can modify the space between the first series point and left diagram edge, and the last series point and right diagram edge . For this, specify custom side margins using the Range.SideMarginsValue property:

AutoSideMargins = true

SideMarginsValue = 0

(AutoSideMargins = false)

The following example shows how to change these distances:

The markup above uses the following classes and properties:

Class or Property Description
Axis.WholeRange Gets or sets an axis whole range.
Range The range.
Range.AutoSideMargins Specifies whether to automatically calculate margins between extreme series points and diagram's edges.
Range.SideMarginsValue Gets or sets custom margins. This value is measured in axis units.

Expanded How to Hide Zero Level on a Chart Value Axis

When a y-axis range is automatically calculated, you can use the AlwaysShowZeroLevel property to hide the zero value level. In this case, a new optimal minimum value is specified for the y-axis:

AlwaysShowZeroLevel = true AlwaysShowZeroLevel = false

Use the code below to hide a y-axis's zero level:

The markup uses the following classes and properties:

Class or Property Description
Axis.WholeRange The axis's whole range.
Range An axis's range.
AxisY2D.AlwaysShowZeroLevel Specifies whether to show the XY Diagram's y-axis zero level.

Use the following properties to hide the zero level in 3D charts and circular charts (Polar and Radar series):

Expanded How to Configure Y-Axis's Range Based on X-Axis's Visual Range

The XYDiagram2D.DependentAxesYRange option allows you to only display y-axis values for point values that are in the x-axis's visual range.

DependentAxesYRange = false DependentAxesYRange = true

The following markup shows how to do this:

The markup uses the following classes and properties:

Class or Property Description
XYDiagram2D.DependentAxesYRange Gets or sets the value indicating whether all y-axes' visual ranges should be calculated only by point values in the x-axis's visual range.
AxisX2D.StickToEdge Gets or sets the value that specifies whether the visual range sticks to the whole range's start or end.

Expanded See Also

Is this topic helpful?​​​​​​​