Gets or sets the ChartSeriesCollection for the legend.
Namespace: MindFusion.Charting.Silverlight
Assembly: MindFusion.Charting.Silverlight
C#
![]() |
---|
public ChartSeriesCollection Series { get; set; } |
Visual Basic
![]() |
---|
Public Property Series As ChartSeriesCollection |
An empty ChartSeriesCollection.
Each label for the legend is taken from ChartSeries.Title property.
The following example adds a ChartLegend to a line chart - the labels and brushes for the legend are taken from the series of the chart.
C#
![]() |
---|
ChartLegend legend = new ChartLegend(); legend.Series = lineChart1.Series; LayoutPanel.SetDock(legend, Dock.Left); lineChart1.Legends.Add(legend); |
Visual Basic
![]() |
---|
Dim legend As ChartLegend = New ChartLegend legend.Series = lineChart1.Series LayoutPanel.SetDock(legend, Dock.Left) lineChart1.Legends.Add(legend) |