Adding Legends
At Design Time
You can add a new legend to a chart at design time as follows:
Select the chart. In the Properties window, locate the ChartControl.Legends property and click the ellipsis button. In the editor, click Add.
Use the Legend.DockTarget property to dock the legend to the required pane or chart control.
Position the legend using LegendBase.AlignmentVertical and LegendBase.AlignmentHorizontal properties.
Tip
For more information on the legend layout, read the following help topic: Legends Alignment and Layout.
Assign the legend to a series, indicator, constant line or strip using the SeriesBase.Legend, Indicator.Legend, ConstantLine.Legend or Strip.Legend property respectively.
The following image shows the result:
Note
The additional legend will not be displayed at runtime until it is assigned to a series, indicator, constant line, or strip. At design time, an empty legend will be labeled with Empty Legend text.
In Code
The following help topic describes how to add additional legends at runtime: How to: Add an Additional Legend to a Chart.
Example: Add an Additional Legend to a Chart
Example: Show a Chart Legend with Markers in a Separate Control
This example shows a ChartControl legend in a GridControl.