v2.1.0
v2.2.0v2.1.0v2.0.0v1.2.0

Chart Legend

A legend is a box that appears along with the plot and displays the information that helps a chart reader better understand the visual representation of the data. Several legend types could appear in the chart hierarchy in the Report explorer.

Global legend

You can use this legend type when a plot has several Data Values to display their names, as in Multiple Values Line Plot example. To show the global legend, turn on the Show Values Names In Legend flag in the plot's properties.

Color Legend

This legend displays the match between the fill or stroke color of plot subsections and the corresponding subcategories of a data value. You should configure the Color Encoding of a plot to display the Color Legend. Almost all the plot types support this legend. For instance, you can check the Stacked Column demo.

Shape Legend

The Line plot supports this type of legend to show the match between the shape of data points symbols and the corresponding subcategories of a data value. You should configure the Shape Encoding of a line plot to display the Shape Legend. Note that Shape Legend and Color legend are merged if you use them together.

Size Legend

The Line plot supports this type of legend to show the match between the size of data points symbols and the corresponding subcategories of a data value. You should configure the Size Encoding of a line plot to display the Size Legend. Shape Legend and Color legend can co-exist within the same plot.

Regardless of the legend type, you can configure its appearance using the following properties.

Title

The string Expression determines the heading of the legend. A subset of text properties in the Legend Title section allows you to set up the title appearance.

Border and Background

The line properties in the Border section and the Background color expression determine the border and fill color of the bounding box of a legend.

Layout and Visibility

The Orientation enum value determines the direction of legend items appearance:

  • Horizontal - from left to right
  • Vertical - from top to bottom

The Position value sets the legend's location relative to the plot area.

You could also set the Padding between the legend bounding box and its content. It automatically increases the size of the legend.

The Visibility flag shows and hides the legend.

Text

A subset of text properties in the Legend Text section allows you to configure the appearance of textual information displayed in the legend.