Skip to main content

X-Axis

  • 4 minutes to read

The X-axis is the axis of arguments.

Chart_XAxis

This topic consists of the following sections.

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.

Chart_XAxisOptions_Button

This will invoke the X-Axis Settings dialog. If X-axis data are not numeric or DateTime, it contains a single tab:

Chart_XAxisOptions_Form

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.

ChartAxis.Visible

Gets or sets whether the chart’s axis is visible.

ChartAxis.Title

Gets or sets the title of the chart’s axis.

ChartAxis.TitleVisible

Gets or sets whether the title of the chart’s axis is visible.

ChartAxis.Reverse

Gets or sets whether the axis is reversed.

ChartAxisX.EnableZooming

Gets or sets whether zooming is enabled for the current X-axis.

ChartAxisX.LimitVisiblePoints

ChartAxisX.VisiblePointsCount

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.

Chart_XAxisOptions_NumericFormat

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.

Chart_XAxisOptions_NumericFormat

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.

Chart_NumericAxis_Continuous

On a discrete axis, all argument values are an equal distance from each other.

Chart_NumericAxis_Discrete

To specify the X-axis type in the Designer, invoke the data item menu for the argument dimension and select the axis type.

Chart_Layout_XAxis_ContinuousDiscrete

To do this in code, use the Dimension.IsDiscreteNumericScale property.

Note

Note that the continuous X-axis is not supported in OLAP mode.

See Also