[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Charting Basics
   [Expand]Series Views
   [Collapse]Chart Elements
     Breadcrumbs
    [Expand]Series
    [Collapse]Diagram
     [Expand]Diagram Types
     [Collapse]Axes
       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
     Chart Titles
    [Expand]Legends
    [Expand]Annotations
   [Expand]Providing Data
   [Expand]Data Representation
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Additional Resources
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[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]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)

Axis Scale Types

This topic explains how to specify axis scale options for different series data types. Scale options allow you to set scale parameters as an axis measurement unit, grid spacing, grid offset, and an aggregate function.

Expanded Overview

An axis scale type depends on the series argument and value types. The Chart Control determines the type based on underlying data. Note that this operation requires additional CPU and RAM resources. Use the SeriesBase.ArgumentScaleType and SeriesBase.ValueScaleType properties to explicitly specify the argument and value types. See Performance for more information.

The ScaleType (see ScaleType) enumeration lists the available axis types:

Numerical and Date-Time Scale Modes

The scale mode (see ScaleMode) defines how the Chart aggregates series point values. All the following modes are available for x-axes, while y-axes always have a continuous scale:

Scale Mode

Description

Automatic

The chart control defines the optimal axis measurement unit based on the data set's values, the Chart Control's current size, and zoom level.

Continuous

An axis is not divided into intervals and a measurement unit is undefined. For this reason, the Chart cannot aggregate data.

Manual

You can specify the axis measurement unit. The NumericMeasureUnit (see NumericMeasureUnit) and DateTimeMeasureUnit (see DateTimeMeasureUnit) enumerations list the available measurement units.

Interval

An axis scale is divided into intervals. This mode allows you to create histograms.

Expanded Handle an Axis with a Numeric Scale

The Chart Control interprets series point arguments and values as numbers when the scale type is Numerical.

Use the AxisBase.NumericScaleOptions property to access axis scale parameters.

The example above uses the following API members:

Member Description
ScaleOptionsBase.ScaleMode Gets or sets the scale mode for an axis.
NumericScaleOptions.MeasureUnit Gets or sets the detail level for numeric values.
ScaleGridOptionsBase.GridOffset Gets or sets the offset of Grid Lines and major tickmarks.
ScaleGridOptionsBase.AggregateFunction Gets or sets the value indicating the aggregate function that should be used to relieve data.
NumericScaleOptions.GridAlignment Gets or sets the numeric measure unit to which the beginning of an axis' gridlines and labels should be aligned.
ScaleGridOptionsBase.GridSpacing Gets or sets the interval between Grid Lines and major tickmarks.

Enable the Logarithmic View for an Axis

You can use a logarithmic scale to display numeric values. When the Logarithmic scale is enabled, the ScaleGridOptionsBase.GridSpacing property value is rounded to integer values:

The property values

The resulting image

Logarithmic = false

Logarithmic = true

LogarithmicBase = 10

The following example shows how to enable the logarithmic view:

The example above uses the following API members:

Member Description
AxisBase.Logarithmic Gets or sets whether the axis should display its numerical values using a logarithmic scale.
AxisBase.LogarithmicBase Gets or sets a value specifying a logarithmic base when the Logarithmic property is enabled.

Examples

Expanded Handle an Axis with a Date-Time Scale

The Chart Control handles series point arguments as the DateTime (see System.DateTime) values.

Use the AxisBase.DateTimeOptions property to access a date-time axis parameters.

The example above uses the following API members:

Member Description
AxisBase.DateTimeScaleOptions Stores the options that define the behavior of a scale when its type is date-time.
ScaleOptionsBase.ScaleMode Gets or sets the scale mode for an axis.
ScaleGridOptionsBase.AggregateFunction Gets or sets the value indicating the aggregate function that should be used to relieve data.
DateTimeScaleOptions.MeasureUnit Gets or sets the detail level for date-time values.
DateTimeScaleOptions.GridAlignment Gets or sets the date-time measure unit to which the beginning of an axis' gridlines and labels should be aligned.
ScaleGridOptionsBase.GridSpacing Gets or sets the interval between Grid Lines and major tickmarks.
DateTimeScaleOptions.WorkdaysOnly Specifies whether holidays and non-working days should be excluded from the axis scale.

The Chart allows you to show only worktime and workday periods. See Work Time and Workday Configuration for more information.

Examples

Expanded Handle an Axis with a Qualitative Scale

The qualitative axis scale allows you to handle series whose arguments are string categories (for example, A, B, C, X, XII, and etc.). The table below describes how qualitative arguments of multiple Series can be plotted in a chart:

Case Example
Qualitative arguments follow one after another when series have different qualitative arguments.
Series overlap when one series uses a secondary axis.
You can plot a series in a separate pane to resolve overlapping series.
Different series' points are grouped by equal string arguments.

Use the AxisXBase.QualitativeScaleOptions property to access the qualitative scale options:

The example above uses the following API members:

Member Description
AxisXBase.QualitativeScaleOptions Provides access to the options that define the behavior of a scale when its type is qualitative.
ScaleGridOptionsBase.AggregateFunction Gets or sets the value indicating the aggregate function that should be used to relieve data.
ScaleGridOptionsBase.AutoGrid Gets or sets the value specifying whether the alignment, spacing and offset of Grid Lines and major tickmarks should be calculated automatically.
ScaleGridOptionsBase.GridSpacing Gets or sets the interval between Grid Lines and major tickmarks.

Reorder Qualitative Axis Values

You can sort qualitative values to put them in specific order. The images below show the default and custom qualitative value order.

Image Description
The qualitative values are plotted in the order that series points have in the collection.
The custom qualitative value order applies.

Assign an object of a class that implements the System.Collections.IComparer interface to the AxisBase.QualitativeScaleComparer property.

Expanded See Also

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