- 3 minutes to read
The Legend is an explanatory component that accompanies a chart’s diagram, identifying its most important visual elements: series, series points (in some cases), constant lines, strips, and indicators.
Note that it is possible to create multiple legends on each chart. Refer to the Adding Legends topic to learn how to add several legends to a chart.
In most cases, a legend displays series names, however, it can also show data points that belong to the same series. To apply this legend representation format to series of most view types, enable their SeriesViewColorEachSupportBase.ColorEach property. Note that this legend view is automatically applied to the Pie series.
A legend that lists and identifies data points belonging to a single series is demonstrated in the following image, using a pie chart as an example:
Each item shown in the legend can be represented by:
a textual description only;
a marker and textual description pair for the legend item (the default option);
a check box and textual description pair for the legend item.
A legend title can accompany a legend, as the following image demonstrates:
Refer to the Legend Title document For more information about legend titles.
A legend is positioned relative to a chart or a pane. For example, in the following image all legends are inside panes with different alignments:
Refer to the Legends Alignment and Layout topic for more information about legend positioning.
You can modify the legend font, background, border and add a shadow if its appearance does not meet your requirements. Refer to the Legends Appearance topic for more information.
The Chart Control can hide its elements if there is insufficient space to display them. Elements are hidden in the following order:
To make the Chart Control always display its elements, disable the ChartControl.AutoLayout property.