Sdílet prostřednictvím


Specify an Axis Interval (Report Builder and SSRS)

The axis interval defines the number of labels and accompanying tick marks on an axis. On the value axis, axis intervals provide a consistent measure of the data points on the chart. However, on the category axis, this functionality can cause categories to appear without axis labels. You can specify the number of intervals you want in the axis Interval property. Reporting Services calculates the number of intervals at run time, based on the data in the result set. For more information about how axis intervals are calculated, see Formatting Axis Labels on a Chart (Report Builder and SSRS).

This topic is not applicable for date or time values on the category axis. Be default, DateTime values appear as days. To specify a different date or time interval, such as a month or time interval, you must format the axis labels and set the axis to display instances of DateTime types instead of String types. In addition, you must set the Interval property. For more information, see Format Axis Labels as Dates or Currencies (Report Builder and SSRS).

This topic does not apply to pie, doughnut, funnel or pyramid charts, which do not have axes.

Note

The category axis is usually the horizontal or x-axis. However, for bar charts, the category axis is the vertical or y-axis.

An example of a chart specifying different axis intervals is available as a sample report. For more information about downloading this sample report and others, see SQL Server 2012 Report Builder and Report Designer sample reports.

Note

You can create and modify report definitions (.rdl) in Report Builder and in Report Designer in SQL Server Data Tools. Each authoring environment provides different ways to create, open, and save reports and related items. For more information, see Designing Reports in Report Designer and Report Builder (SSRS) on the Web at microsoft.com.

To show all category labels on the x-axis

  1. Right-click the category axis and click Axis Properties. The Axis Properties dialog box opens.

  2. In Axis Options, set Interval to 1. Every category group label is displayed. If you want to show every other category group label on the x-axis, type 2.

  3. Click OK.

    Note

    When an axis interval is set, all automatic labeling is disabled. If you specify a value for the axis interval, you may experience unpredictable labeling behavior depending on how many categories are on the category axis.

To enable a variable interval calculation on an axis

  1. Right-click the chart axis that you want to change, and then click Axis Properties. The Axis Properties dialog box opens.

  2. In Axis Options, set Interval to Auto. The chart will display the optimal number of category labels that can fit along the axis.

  3. Click OK.

See Also

Tasks

Sort Data in a Data Region (Report Builder and SSRS)

Specify a Logarithmic Scale (Report Builder and SSRS)

Plot Data on a Secondary Axis (Report Builder and SSRS)

Reference

Axis Properties Dialog Box, Axis Options (Report Builder and SSRS)

Concepts

Formatting a Chart (Report Builder and SSRS)

Formatting Data Points on a Chart (Report Builder and SSRS)