Specify an Axis Interval (Report Builder and SSRS)

 

Updated: September 2, 2016

Applies To: SQL Server 2016

Learn to change the number of labels and tick marks on the category (x) axis in a chart by setting the axis interval in a Reporting Services paginated report.

On the value axis (usually the y axis), axis intervals provide a consistent measure of the data points on the chart.

But on the category axis (usually the x axis), sometimes an automatic axis interval results in categories 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.

To try setting the axis interval with sample data, see Tutorial: Add a Column Chart to Your Report.

System_CAPS_ICON_note.jpg Note


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

This topic doesn't apply to:

  • Date or time values on the category axis. Be default, DateTime values appear as days. You can specify a different date or time interval, such as a month or time interval. For more information, see Format Axis Labels as Dates or Currencies.
  • Pie, doughnut, funnel or pyramid charts, which do not have axes.

In this column chart, the horizontal label interval is set to Auto.

report-builder-column-chart-preview-x-axis-interval-auto

  1. Right-click the category axis and click Horizontal Axis Properties.

    report-builder-column-chart-x-axis-labels

  2. In the Horizontal Axis Properties dialog box > Axis Options tab, set Interval to 1 to show every category group label. To show every other category group label on the x-axis, type 2.

    report-builder-column-chart-x-axis-interval-one

  3. Click OK.

    Now the column chart displays all its horizontal axis labels.

    report-builder-column-chart-preview-x-axis-interval-one

    System_CAPS_ICON_note.jpg Note


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

You can also set the label interval in the Properties pane.

  1. In report design view, click the chart, then select the horizontal axis labels.

  2. In the Properties pane, set LabelInterval to 1.

    report-builder-column-chart-set-label-interval

    The chart looks the same in design view.

  3. Click Run to preview the report.

    report-builder-column-chart-label-interval-one-preview

    Now the chart displays all its labels.

By default, Reporting Services sets the axis interval to Auto. This procedure explains how to set it back to the default.

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

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

  3. Click OK.

Formatting a Chart (Report Builder and SSRS)
Formatting Data Points on a Chart (Report Builder and SSRS)
Sort Data in a Data Region (Report Builder and SSRS)
Axis Properties Dialog Box, Axis Options (Report Builder and SSRS)
Specify a Logarithmic Scale (Report Builder and SSRS)
Plot Data on a Secondary Axis (Report Builder and SSRS)

Community Additions

ADD
Show: