Legend Formatting
When a hierarchy or measure is added to the Color drop zone, a corresponding legend is automatically added to the canvas. These legends can be edited , and series editing can also be used to change the colors and fonts in the legend series.
The Formatting panel allows you change the look and feel of the legend by adjusting fonts, layout, position, and more.
- A legend is automatically added to the canvas when a hierarchy or measure is added to the Color drop zone, whether you're working with charts or grids.
- Using the Formatting panel, and the formatting selection tool, you can change the legend's font and layout, and you can position the legend in four locations on the canvas (the right, left, top, or bottom).
- You can also reposition the legend by dragging and dropping it.
- Show or hide the legend as required (by selecting Hide from its context menu, or by selecting the required option from its drop down menu in the Component ribbon).
- Any customizations made to the legend will be maintained when the visualization is added to presentations and publications.
Legend Formatting Options
Legend formatting can be applied from the Formatting panel, or the Legend drop-down in the Component ribbon.
Formatting Panel
There are a few ways to access the legend formatting options in the Formatting panel:
- Select Legend form the Formatting panel main drop-down menu.
- Use the formatting selection tool to select the legend from the canvas.
- Right click on the legend's context menu and click Settings (blue highlight below).
Discrete Legends
A discrete legend is one that consists of a list of elements or measures, which are color coded according to the color assigned to them in the visual. When a hierarchy or list of elements is added to the color or shape zone, a discrete legend is produced.
Settings
The Settings formatting options are used to adjust the position of the legend on the canvas, and the layout of the columns in a discrete legend.
- Position: position the legend at the top, bottom, right, or left of the canvas.
- Layout: (this option is supported for discrete legends only) change the legend's layout.
- Auto: when the legend panel is moved to the top or bottom of the canvas, the Number of Columns setting is overridden to automatically display the legend according to the best fit of element labels within the legend panel.
- Fixed: allows you to manually set the number of columns into which the legend elements will be divided.
- Wrap: wrap the legend. This option will display only one column.
- Columns: (this option is supported for discrete legends only) this option is enabled when the Fixed layout is selected; determine the number of columns to split the legend elements into.
Title
The Title formatting options are used to adjust the title of the legend.
Show Title
- Show Title: show or hide the legend title.
- Title: choose an auto or custom title. An auto title is generated according to the hierarchy or measure in the legend; to change the title, choose Custom.
Title Font
- Font: change the title font type.
- Size: change the title font size.
- Style: change the title font style - bold, italics, or color.
- Position: change the position of the title.
- Auto: let Pyramid position the title automatically.
- Horizontal: position the title horizontally along the first line of the legend's elements.
- Top Start: the title will be above the legend's first line of elements, on the left side.
- Top Center: the title will be above the legend's first line of elements, in the middle.
- Top End: the title will be above the legend's first line of elements, on the right side.
- Legacy: apply legacy position from BI Office.
Title Separator
- Title Separator: add a line underneath the title.
- Thickness: change the thickness of the title separator.
- Color: change the color of the title separator.
Legend
The Legend tab in the Formatting panel is used to adjust the font, padding, and format string for the legend contents (excluding the title).
- Font: change the font type of the legend's elements.
- Size: change the font size.
- Style: change the title font style - bold, italics, or color.
- Padding: (supported for discrete legends only) add padding between each legend element.
- Format String: (supported for measure legends only) change the format string in the legend.
Continuous Legends
A continuous legend is one that appears as a continuous line, or box, with a color gradient reflecting the range of values for the given measure within the context of the query. Whenever a measure is placed in the Color zone, a continuous legend is produced.
Settings
- Position: position the legend at the top, bottom, right, or left of the canvas.
Title
The options here are the same as those described above for the Title tab for discrete legends.
Legend
The Legend tab in the Formatting panel is used to adjust the font, padding, and format string for the legend contents (excluding the title).
- Font: change the font type of the legend's elements.
- Size: change the font size.
- Style: change the title font style - bold, italics, or color.
- Format String: change the measure format by selecting one of the drop-down options, or enter a custom format.
Continues
This option is exposed when working with continuous legends only.
- Band 1: choose the starting color from the color picker.
- Band 2: choose the ending color from the color picker.
Legend Drop-Down
The legend drop-down in the Component ribbon lets you show or hide the legend, or change its position on the canvas:
Examples
In this example, the title was bolded and italicized, and a green title separator was added:
Here, the legend was moved to the top of the canvas, and the title position was changed to Horizontal. The font for both title and legend was changed Verdana, and a green title separator was added.