Customize the Legend of a Chart

You can customize the legend and its elements, including its title, position, and items.

You can hide or show the legend and change its position relative to the chart object, chart area, or using a specific report expression. For example, in a bar chart showing revenue for each product line by country or region, you could use the expression [Country or Region] = 'Canada' to position the legend relative to the Canada bar.

You can change the title that appears above the legend.

If your legend includes items that are too long, you can truncate long legend items at a specific number of characters.

For example, if you want an ellipsis (...) to appear at the end of each truncated legend item, type ... in the Truncation text box.

Procedure

  1. Select the chart object.
  2. In the Properties pane, click Legend.
  3. To show the legend on the chart, select the Show legend check box.
  4. To choose a preset legend position, click Preset and click a position from the diagram.
    Note: When you choose a preset legend position, that position appears inside any padding that you have added to the chart object. Customized legend positions do not include any chart padding.
  5. To choose a customized legend position, do the following:
    • Click Advanced and click the ellipsis (...) button.
    • To display the legend at a set distance from the sides of the chart area, from the Anchor list, click Relative to Chart.
    • To display the legend at a set distance from the sides of the chart body, from the Anchor list, click Relative to Chart Body.
    • To display the legend at a set distance from a report expression, from the Anchor list, click Report Expression, click the ellipsis (...) button beside Expression, and enter an expression in the Report Expression dialog box.
    • Set the horizontal and vertical distances from the anchor.
  6. To change the text that appears as the legend title, select the legend object, and in the Properties pane, click Legend title and specify the title.
  7. To truncate the items in the legend, do the following:
    • Select the legend object.
    • In the Properties pane, click Text truncation.
    • To specify the number of characters at which the legend items are truncated, click Manual and type the number of characters in the Maximum characters box.
    • To shrink the font of the legend item text until all the text fits in the legend, select the Shrink font as needed check box.
    • To specify some text to appear at the end of truncated legend items, type the text in the Truncation text box.