X-Axis
- 4 minutes to read
The X-axis is the axis of arguments.
This topic consists of the following sections.
- Common X-Axis Settings
- Numeric Format X-Axis Settings
- DateTime Format X-Axis Settings
- Continuous and Discrete X-Axes
To access X-axis settings, use the X-Axis Settings button in the Diagram section of the Design Ribbon tab of the Chart Tools contextual tab set.
This will invoke the X-Axis Settings dialog. If X-axis data are not numeric or DateTime, it contains a single tab:
Common X-Axis Settings
This tab contains the following settings.
Reverse | Allows you to reverse the X-axis. If the X-axis is reversed, its values are ordered from right to left. |
Show X-axis | Allows you to hide and show the X-axis. |
Show title | Allows you to hide and show the X-axis title. You can choose whether to use the default text or specify a custom string. |
Enable zooming | Allows you to enable zooming for the X-axis. The X-axis’ scroll bar provides the capability to perform navigation in the zoomed diagram. |
Limit visible points | Allows you to limit the number of points displayed on the chart’s diagram along the X-axis. The X-axis’ scroll bar provides the capability to perform navigation if the number of all points exceeds the number of visible points. |
To access X-axis settings in code, use the ChartDashboardItem.AxisX property. The returned ChartAxisX object exposes the following properties.
Gets or sets whether the chart’s axis is visible. | |
Gets or sets the title of the chart’s axis. | |
Gets or sets whether the title of the chart’s axis is visible. | |
Gets or sets whether the axis is reversed. | |
Gets or sets whether zooming is enabled for the current X-axis. | |
Gets or sets whether the number of visible points is limited for the current X-axis. Gets or sets the number of visible points displayed for the current X-axis. |
Numeric Format X-Axis Settings
If arguments are numeric, the X-Axis Settings dialog contains a Numeric Format tab. It allows you to specify the numeric display formats for X-Axis data, as described in the Formatting Data document. In code, you can use the ChartAxisX.NumericFormat property.
The tab contains the following settings.
Format type | Specifies format types for numeric values. Available types are listed in the DataItemNumericFormatType enumeration. |
Unit | Specifies the unit to convert the numeric values. Available types are listed in the DataItemNumericUnit enumeration. |
Precision | Specifies the number of fractional digits to display. |
Currency | Specifies the currency symbol and format provided by the RegionInfo class. |
Culture | Specifies the name of a culture that defines the currency symbol and format. |
Include group separator | Specifies whether separators should be inserted between digit groups. |
DateTime Format X-Axis Settings
For date and time arguments, the X-Axis Settings dialog displays a Numeric Format tab. It allows you to specify the date and time display formats for X-Axis data. In code, you can use the ChartAxisX.DateTimeFormat property.
Using the dialog, you can override default formats applied according to the data grouping type, as described in the Grouping document. The following image shows the Date Time Format tab in the dialog when the grouping type is set to Exact Date. Click the Reset to Default button to return all format settings back to their default values.
The tab contains settings described in detail in the Formatting Data document.
Continuous and Discrete X-Axes
If the dimension in the Arguments section contains numeric data, the Chart can create either a continuous X-axis or a discrete X-axis.
Continuous X-axis | Discrete X-axis |
---|---|
If a continuous axis is used, the distance between argument values is proportional to their values. | On a discrete axis, all argument values are an equal distance from each other. |
To specify the X-axis type in the Designer, invoke the data item menu for the argument dimension and select the axis type.
To do this in code, use the Dimension.IsDiscreteNumericScale property.
Note
Note that the continuous X-axis is not supported in OLAP mode.