[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Collapse]Chart Control
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamentals
   [Collapse]Concepts
    [Expand]Creating Charts
    [Collapse]Chart Elements
     [Expand]Series
     [Expand]Diagram
     [Collapse]Axes
       Axes Overview
       Axis Scale Types
       Visual Ranges and Whole Ranges
       Primary and Secondary Axes
       Grid Lines,Tickmarks and Interlacing
       Axis Appearance and Position
       Axis Titles
       Axis Labels
       Strips
       Constant Lines
       Scale Breaks
     [Expand]Panes
     [Expand]Legend
     [Expand]Chart Titles
     [Expand]Annotations
     [Expand]Indicators
    [Expand]End-User Interaction
     Supported Browsers
     Adding a Web Chart
     Handling Client-side Scripts
     Medium Trust Support
     Web Farm and Web Gardens Support
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Examples
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[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]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Visual Ranges and Whole Ranges

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.

Expanded 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

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.

Expanded 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.

Note

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.

Expanded 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.

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