# Format Chart Legend

## Format chart legend

Chart legends associate chart mark colours, shapes, sizes, types, and other attributes with specific groups or values. This helps users interpret data when the chart metric is distributed into categories (like regions or product types) or when a metric defines size or colour scale. Most visualisation types in Analytics Pro support legends that you can format to improve chart usability and readability.

<figure><img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_intro.png" alt=""><figcaption></figcaption></figure>

This document explains how to change a legend’s visibility and customise its position, font size, and text colour.

If you want to target multiple charts with one legend, use a legend control.

### Show or hide the legend and header

Change the visibility of the chart legend, and choose to display it with or without a header when applicable. The header specifies the variable categorised into groups or the metric that defines the chart’s size or colour scale.

1. Open a workbook in **Explore** or **Edit** mode and select the visualisation element you want to modify.
2. Select ![](https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Icons/element-format.svg) **Element format** in the side navigation, then click the **Legend** header to expand the section.
3. To change the visibility of the chart legend (including the header and labels), configure the **Show legend** field:

   * To show the legend, select the checkbox.
   * To hide the legend, clear the checkbox.

   <figure><img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_show-legend.png" alt=""><figcaption></figcaption></figure>
4. To change the visibility of the legend header (when the legend is displayed), configure the **Show legend header** field:

   * To show the header, select the checkbox.

   * To hide the header and display labels only, clear the checkbox.

   > ### 📘When you configure the **Marks** > **Size** property in a scatter plot, the visualisation element supports two separate legends for colour and size. You can change the visibility of the individual legends by configuring the **Show colour legend** and **Show size legend** fields.

   <figure><img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_hide-header.png" alt=""><figcaption></figcaption></figure>

### Change the legend position

Change the position of the legend relative to the chart.

1. Open a workbook in **Explore** or **Edit** mode and select the visualisation element you want to modify.
2. Select ![](https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Icons/element-format.svg) **Element format** in the side navigation, then click the **Legend** header to expand the section.
3. Click the **Position** field and select an option from the dropdown.<br>

   <figure><img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_legend-position.png" alt=""><figcaption></figcaption></figure>

   | Top                                                                                                                                              | Bottom                                                                                                                                              | Left                                                                                                                                              | Right                                                                                                                                              |
   | ------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
   | ![](https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_legend-position_top.png) | ![](https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_legend-position_bottom.png) | ![](https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_legend-position_left.png) | ![](https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_legend-position_right.png) |

   <br>

   | Top left                                                                                                                                              | Top right                                                                                                                                              | Bottom left                                                                                                                                              | Bottom right                                                                                                                                              |
   | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | ![](https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_legend-position_top-left.png) | ![](https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_legend-position_top-right.png) | ![](https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_legend-position_bottom-left.png) | ![](https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_legend-position_bottom-right.png) |

### Customise the labels

Customise the font size and colour of the legend labels. Legend headers aren’t affected by label formatting.

1. Open a workbook in **Explore** or **Edit** mode and select the visualisation element you want to modify.
2. Select ![](https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Icons/element-format.svg) **Element format** in the side navigation, then click the **Legend** header to expand the section.
3. To change the size of the labels, click the **Label font size** dropdown and select an option (10-48px).

   <figure><img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_label-font-size.png" alt=""><figcaption></figcaption></figure>
4. To change the font colour of the labels, click **Label text colour** field, then enter a hex value or select an option from the colour palette or picker.

   <figure><img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_label-font-color.png" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Workbooks/Visualizations/Format+chart+legend/chart-legend_label-format.png" alt=""><figcaption></figcaption></figure>
