Add Legend
Enables a legend on an existing pie chart.
Overview
This procedure adds a legend to a pie chart that has already been created. Legends are only supported for pie charts and will display the category names alongside the chart slices.
Syntax
Below is a line-by-line overview of the automation syntax. Expand each line to learn more.
Examples
1. Add Legend to Pie Chart
create a pie chart where
the categories are ["Desktop", "Mobile", "Tablet"]
the values are [52.3, 35.8, 11.9]
the title is "Website Traffic Sources"
the style is "white"
add a legend to the chart
show the chart
Last updated
Was this helpful?