Visual Ranges and Whole Ranges

  • 4 min to read

This document provides a brief overview of a visual range and a whole range, and also details how to change the range of axis coordinates, therefore limiting or increasing the volume of data represented by an associated series.

For the purpose of simplicity, this document will use the most common diagram type - an XY-diagram.

Note that before reading this topic, it may be useful to review the basics of using axes in the ASP.NET Chart Control.

This document consists of the following sections.

Range Overview

The axis range is represented by the whole range and visual range.

The whole range determines the overall range of series associated with the axis, while visual range determines the axis range of values displayed on a single screen. The visual range can be less than or equal to the whole range. So, changing the visual range does not affect the whole range. If the maximum or minimum value of the series extends beyond the visual range, the chart's series will partially (or completely) fall out of the diagram.

To define an axis range, change the minimum and maximum values of the whole range. In this case the visual range will be equal to the whole range.

The following table shows this behavior for the X-axis.

Visual Range is equal to Whole Range Visual Range is less than Whole Range
VisualEqualWhole VisualLessWhole

The axis range can be defined for all existing diagram types, with the exception of the Simple and Simple 3D diagrams, since they do not have axes.

When the Qualitative and DateTime scale types are used for an axis (more on this at Axis Scale Types), XtraCharts recalculate maximum and minimum range values into float numbers internally. These float representations are available from the Range.MinValueInternal and Range.MaxValueInternal properties.

In addition, you can determine whether side margins should be maintained before and after the maximum and minimum axis values defined by the axis range. This way, you will not have to worry about showing the outermost points of an associated series at the diagram's edge. To accomplish this, set the Range.AutoSideMargins to true. You can specify custom side margins using the Range.SideMarginsValue property. This resets the Range.AutoSideMargins property.

By default, the Range.AutoSideMargins property is disabled for series of the area view types (area, stacked area and full-stacked area).

The sections below detail how to customize visual range and whole range individually.

Visual Range

The visual range is represented by the VisualRange object and can be accessed from the AxisBase.VisualRange property. The visual range (as well as the whole range) is defined by the Range.MaxValue and Range.MinValue property values, which are calculated automatically, since the Range.Auto property of the axis is enabled by default. However, you can customize these properties as your needs dictate.


The visual range does not affect the whole range. If you wish to extend an axis range beyond its default bounds, change the AxisBase.WholeRange property first. After that you can determine which part of the entire range should be shown on a single screen by specifying the AxisBase.VisualRange property.

The following image demonstrates the available axis range options and the appearance of a chart, when its Range.Auto property is set to true.


When the visual range is set to Auto, its minimum and maximum axis values are calculated automatically, based on the whole range values. So, to define an axis range in Auto mode, you should change the minimum and maximum values of the whole range.

If you change the default range for axis visual range (or whole range) using either the Range.MinValue or Range.MaxValue properties, this automatically resets the Range.Auto property.


Whole Range

The whole range is represented by the WholeRange object which is accessed from the AxisBase.WholeRange property. The whole range options are similar to the visual range options of axes.


To learn more on axis, see Axes sections.