WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartLegend

    Show / Hide Table of Contents

    Class ChartLegend

    Represents WPF chart legend class.

    Inheritance
    System.Object
    ChartLegend
    Implements
    IChartSerializer
    Namespace: Syncfusion.Windows.Chart
    Assembly: Syncfusion.Chart.Wpf.dll
    Syntax
    public class ChartLegend : HeaderedItemsControl, IChartSerializer
    Remarks

    Chart legend can be added either as chart's child or as ChartArea's child.

    Per legend's default template, it represents ChartSeries except of cases when series' type is set to one of following ChartTypes: Pie, Doughnut, Pyramid and Funnel. For such chart types legend represents ChartSegment.

    As either child of Chart or ChartArea, legend has all abilities: such as docking and enabling or disabling corresponding series (segments).

    Examples

    C#:

    //Window's constructor.
    public Window1()
    {
    InitializeComponent();
    //Creating a new chart instance.
    Chart chart = new Chart();
    //Creating a chart legend.
    ChartLegend legend = new ChartLegend();
    //Setting legend's attached ChartDock property.
    ChartDockPanel.SetDock(legend, ChartDock.Left);
    //Adding legend to chart.
    chart.Legends.Add(legend);
    //Adding 2 areas on chart.
    chart.Areas.Add(new ChartArea());
    chart.Areas.Add(new ChartArea());
    //Assigning second area's Legend property.
    chart.Areas[1].Legend = new ChartLegend();
    ChartDockPanel.SetDock(chart.Areas[1].Legend, ChartDock.Right);
    //Creating series reference.
    ChartSeries series;
    //Creating collection of chart points.
    ChartListData data = new ChartListData();
    //Adding 3 series with have 2 points for each to first chart area.
    for (int i=1;i<=6;i++)
    {
    //Adding point with X == i and Y == i;
    data.Add(new ChartPoint(i, i));
    if (i % 2 == 0)
    {
    //Creating a new chart series.
    series = new ChartSeries(ChartTypes.Area);
    //Setting series' label;
    series.Label = "Series " + i/2;
    //Setting datapoints.
    series.Data = data;
    //Adding series to area.
    chart.Areas[0].Series.Add(series);
    //Creating new data points.
    data = new ChartListData();
    }
    }
    //Creating new data points.
    data = new ChartListData();
    //Creating a new series type of Pie.
    series = new ChartSeries(ChartTypes.Pie);
    //Setting Label property as representation of series on legend.
    series.Label = "Series 4";
    //Adding 9 data points.
    for (int i = 1; i < 10; i++)
    {
    data.Add(new ChartPoint(i,i));
    }
    //Assigning data to Pie series.
    series.Data = data;
    //Adding Pie series to area.
    chart.Areas[1].Series.Add(series);
    //Setting window's content.
    this.Content = chart;
    }
    XAML:
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Title="Legends sample" Height="500" Width="500"
    WindowStartupLocation="CenterScreen">
    <syncfusion:Chart
    xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
    <syncfusion:Chart.Legends>
    <syncfusion:ChartLegend syncfusion:ChartDockPanel.Dock="Left"/>
    </syncfusion:Chart.Legends>
    <syncfusion:Chart.Areas>
    <syncfusion:ChartArea>
    <syncfusion:ChartSeries Label="Series 1" Data="1 1 2 2" Type="Area"/>
    <syncfusion:ChartSeries Label="Series 2" Data="3 3 4 4" Type="Area"/>
    <syncfusion:ChartSeries Label="Series 3" Data="5 5 6 6" Type="Area"/>
    </syncfusion:ChartArea>
    <syncfusion:ChartArea>
    <syncfusion:ChartArea.Legend>
    <syncfusion:ChartLegend syncfusion:ChartDockPanel.Dock="Right"/>
    </syncfusion:ChartArea.Legend>
    <syncfusion:ChartSeries Label="Series 4" Data="1 1 2 2 3 3 4 4 5 5 6 6 7 7 8
    8 9 9" Type="Pie"/>
    </syncfusion:ChartArea>
    </syncfusion:Chart.Areas>
    </syncfusion:Chart>
    </Window>

    Constructors

    ChartLegend()

    Initializes a new instance of the ChartLegend class.

    Declaration
    public ChartLegend()

    Fields

    CheckBoxVisibilityProperty

    Identifies the CheckBoxVisibility dependency property.

    Declaration
    public static DependencyProperty CheckBoxVisibilityProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    ColumnsCountProperty

    Identifies the ColumnsCount dependency property.

    Declaration
    public static DependencyProperty ColumnsCountProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    CornerRadiusProperty

    Identifies the CornerRadius dependency property.

    Declaration
    public static DependencyProperty CornerRadiusProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    ElementMarginProperty

    Identifies the ElementMargin dependency property.

    Declaration
    public static DependencyProperty ElementMarginProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    HorizontalContentAlignmentProperty

    Identifies the HorizontalContentAlignment dependency property.

    Declaration
    public static readonly DependencyProperty HorizontalContentAlignmentProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    IconHeightProperty

    Identifies the IconHeight dependency property.

    Declaration
    public static DependencyProperty IconHeightProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    IconVisibilityProperty

    Identifies the IconVisibility dependency property.

    Declaration
    public static DependencyProperty IconVisibilityProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    IconWidthProperty

    Identifies the IconWidth dependency property.

    Declaration
    public static DependencyProperty IconWidthProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    IsLegacyLegendStyleEnabledProperty

    Identifies the LegacyLegendStyleEnabled dependency property

    Declaration
    public static readonly DependencyProperty IsLegacyLegendStyleEnabledProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    IsSegmentsLegendProperty

    Identifies the IsSegmentsLegend dependency property.

    Declaration
    public static readonly DependencyProperty IsSegmentsLegendProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    ItemMarginProperty

    Identifies the ItemMargin dependency property.

    Declaration
    public static DependencyProperty ItemMarginProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    LegendItemsPanelProperty

    Dependency Property for LegendItemsPanel

    Declaration
    public static readonly DependencyProperty LegendItemsPanelProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    LegendPanelProperty

    Using a DependencyProperty as the backing store for LegendPanel. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty LegendPanelProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    OffsetXProperty

    Identifies the OffsetX dependency property.

    Declaration
    public static readonly DependencyProperty OffsetXProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    OffsetYProperty

    Identifies the OffsetY dependency property.

    Declaration
    public static readonly DependencyProperty OffsetYProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    OrientationProperty

    Identifies the Orientation dependency property.

    Declaration
    public static DependencyProperty OrientationProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    OrientationSealedOnDockProperty

    Identifies the OrientationSealedOnDock dependency property.

    Declaration
    public static readonly DependencyProperty OrientationSealedOnDockProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    RowsCountProperty

    Identifies the RowsCount dependency property.

    Declaration
    public static DependencyProperty RowsCountProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    ShowSymbolProperty

    Identifies the ShowSymbol dependency property.

    Declaration
    public static readonly DependencyProperty ShowSymbolProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    TextAlignmentProperty

    Identifies the TextAlignment dependency property.

    Declaration
    public static DependencyProperty TextAlignmentProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    VerticalContentAlignmentProperty

    Identifies the VerticalContentAlignment dependency property.

    Declaration
    public static readonly DependencyProperty VerticalContentAlignmentProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    Properties

    CheckBoxVisibility

    Gets or sets a value indicating whether the checkbox of the legend items are visible. This is a dependency property.

    Declaration
    public Visibility CheckBoxVisibility { get; set; }
    Property Value
    Type Description
    System.Windows.Visibility

    The check box visibility.

    Remarks

    Double clicking on legend will make a legend's window appear that can also be used to change checkboxes visibility.

    Examples

    C#:

    public Window1()
    {
    InitializeComponent();
    //Creating a new chart instance.
    Chart chart = new Chart();
    //Creating a chart legend.
    ChartLegend legend = new ChartLegend();
    //Setting rows and columns count.
    legend.CheckBoxVisibility = Visibility.Visible;
    //Setting legend's attached ChartDock property.
    ChartDockPanel.SetDock(legend, ChartDock.Left);
    //Adding legend to chart.
    chart.Legends.Add(legend);
    //Adding area to chart.
    chart.Areas.Add(new ChartArea());
    //Creating new chart data points.
    ChartListData data = new ChartListData();
    data.Add(new ChartPoint(1, 3));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 2));
    //Creating new series.
    ChartSeries series1 = new ChartSeries();
    //Assigning series' label.
    series1.Label = "Series 1";
    //Assigning data.
    series1.Data = data;
    //Adding series to area.
    chart.Areas[0].Series.Add(series1);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 5));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 6));
    //Creating second series.
    ChartSeries series2 = new ChartSeries();
    //Assigning series' label.
    series2.Label = "Series 2";
    series2.Data = data;
    chart.Areas[0].Series.Add(series2);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 2));
    data.Add(new ChartPoint(2, 3));
    data.Add(new ChartPoint(3, 7));
    //Creating second series.
    ChartSeries series3 = new ChartSeries();
    //Assigning series' label.
    series3.Label = "Series 3";
    series3.Data = data;
    chart.Areas[0].Series.Add(series3);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 7));
    data.Add(new ChartPoint(2, 2));
    data.Add(new ChartPoint(3, 5));
    //Creating second series.
    ChartSeries series4 = new ChartSeries();
    //Assigning series' label.
    series4.Label = "Series 4";
    series4.Data = data;
    chart.Areas[0].Series.Add(series4);
    //Setting window's content.
    this.Content = chart;
    }
    XAML:
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Title="Window1" Height="500" Width="500"
    WindowStartupLocation="CenterScreen">
    <syncfusion:Chart
    xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
    <syncfusion:Chart.Legends>
    <syncfusion:ChartLegend CheckBoxVisibility="Visible"/>
    </syncfusion:Chart.Legends>
    <syncfusion:Chart.Areas>
    <syncfusion:ChartArea>
    <syncfusion:ChartSeries Label="Series 1" Data="1 3 2 7 3 2"/>
    <syncfusion:ChartSeries Label="Series 2" Data="1 5 2 7 3 6"/>
    <syncfusion:ChartSeries Label="Series 3" Data="1 2 2 6 3 1"/>
    <syncfusion:ChartSeries Label="Series 4" Data="1 5 2 3 3 8"/>
    <syncfusion:ChartSeries Label="Series 5" Data="1 7 2 3 3 4"/>
    <syncfusion:ChartSeries Label="Series 6" Data="1 5 2 2 3 3"/>
    </syncfusion:ChartArea>
    </syncfusion:Chart.Areas>
    </syncfusion:Chart>
    </Window>

    See Also
    ChartArea
    ChartSeries

    ColumnsCount

    Gets or sets the number of columns to be used for items in the legend. This is a dependency property.

    Declaration
    public int ColumnsCount { get; set; }
    Property Value
    Type Description
    System.Int32

    The columns count.

    Examples

    C#:

    public Window1()
    {
    InitializeComponent();
    //Creating a new chart instance.
    Chart chart = new Chart();
    //Creating a chart legend.
    ChartLegend legend = new ChartLegend();
    //Setting rows and columns count.
    legend.RowsCount = legend.ColumnsCount = 2;
    //Setting legend's attached ChartDock property.
    ChartDockPanel.SetDock(legend, ChartDock.Left);
    //Adding legend to chart.
    chart.Legends.Add(legend);
    //Adding area to chart.
    chart.Areas.Add(new ChartArea());
    //Creating new chart data points.
    ChartListData data = new ChartListData();
    data.Add(new ChartPoint(1, 3));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 2));
    //Creating new series.
    ChartSeries series1 = new ChartSeries();
    //Assigning series' label.
    series1.Label = "Series 1";
    //Assigning data.
    series1.Data = data;
    //Adding series to area.
    chart.Areas[0].Series.Add(series1);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 5));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 6));
    //Creating second series.
    ChartSeries series2 = new ChartSeries();
    //Assigning series' label.
    series2.Label = "Series 2";
    series2.Data = data;
    chart.Areas[0].Series.Add(series2);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 2));
    data.Add(new ChartPoint(2, 3));
    data.Add(new ChartPoint(3, 7));
    //Creating second series.
    ChartSeries series3 = new ChartSeries();
    //Assigning series' label.
    series3.Label = "Series 3";
    series3.Data = data;
    chart.Areas[0].Series.Add(series3);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 7));
    data.Add(new ChartPoint(2, 2));
    data.Add(new ChartPoint(3, 5));
    //Creating second series.
    ChartSeries series4 = new ChartSeries();
    //Assigning series' label.
    series4.Label = "Series 4";
    series4.Data = data;
    chart.Areas[0].Series.Add(series4);
    //Setting window's content.
    this.Content = chart;
    }
    XAML:
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Height="500" Width="500" WindowStartupLocation="CenterScreen">
    <syncfusion:Chart
    xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
    <syncfusion:Chart.Legends>
    <syncfusion:ChartLegend RowsCount="2" ColumnsCount="3"/>
    </syncfusion:Chart.Legends>
    <syncfusion:Chart.Areas>
    <syncfusion:ChartArea>
    <syncfusion:ChartSeries Label="Series 1" Data="1 3 2 7 3 2"/>
    <syncfusion:ChartSeries Label="Series 2" Data="1 5 2 7 3 6"/>
    <syncfusion:ChartSeries Label="Series 3" Data="1 2 2 6 3 1"/>
    <syncfusion:ChartSeries Label="Series 4" Data="1 5 2 3 3 8"/>
    <syncfusion:ChartSeries Label="Series 5" Data="1 7 2 3 3 4"/>
    <syncfusion:ChartSeries Label="Series 6" Data="1 5 2 2 3 3"/>
    </syncfusion:ChartArea>
    </syncfusion:Chart.Areas>
    </syncfusion:Chart>
    </Window>

    See Also
    ChartArea
    ChartSeries

    CornerRadius

    Gets or sets the CornerRadius of legend's border. This is a dependency property.

    Declaration
    public CornerRadius CornerRadius { get; set; }
    Property Value
    Type Description
    System.Windows.CornerRadius

    The corner radius.

    Examples

    C#:

    public Window1()
    {
    InitializeComponent();
    //Creating a new chart instance.
    Chart chart = new Chart();
    //Creating a chart legend.
    ChartLegend legend = new ChartLegend();
    //Setting rows and columns count.
    legend.CornerRadius = new CornerRadius(10,3,10,2);
    //Setting legend's attached ChartDock property.
    ChartDockPanel.SetDock(legend, ChartDock.Left);
    //Adding legend to chart.
    chart.Legends.Add(legend);
    //Adding area to chart.
    chart.Areas.Add(new ChartArea());
    //Creating new chart data points.
    ChartListData data = new ChartListData();
    data.Add(new ChartPoint(1, 3));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 2));
    //Creating new series.
    ChartSeries series1 = new ChartSeries();
    //Assigning series' label.
    series1.Label = "Series 1";
    //Assigning data.
    series1.Data = data;
    //Adding series to area.
    chart.Areas[0].Series.Add(series1);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 5));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 6));
    //Creating second series.
    ChartSeries series2 = new ChartSeries();
    //Assigning series' label.
    series2.Label = "Series 2";
    series2.Data = data;
    chart.Areas[0].Series.Add(series2);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 2));
    data.Add(new ChartPoint(2, 3));
    data.Add(new ChartPoint(3, 7));
    //Creating second series.
    ChartSeries series3 = new ChartSeries();
    //Assigning series' label.
    series3.Label = "Series 3";
    series3.Data = data;
    chart.Areas[0].Series.Add(series3);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 7));
    data.Add(new ChartPoint(2, 2));
    data.Add(new ChartPoint(3, 5));
    //Creating second series.
    ChartSeries series4 = new ChartSeries();
    //Assigning series' label.
    series4.Label = "Series 4";
    series4.Data = data;
    chart.Areas[0].Series.Add(series4);
    //Setting window's content.
    this.Content = chart;
    }
    XAML:
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Title="Window1" Height="500" Width="500"
    WindowStartupLocation="CenterScreen">
    <syncfusion:Chart
    xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
    <syncfusion:Chart.Legends>
    <syncfusion:ChartLegend CornerRadius="10,3,10,2"/>
    </syncfusion:Chart.Legends>
    <syncfusion:Chart.Areas>
    <syncfusion:ChartArea>
    <syncfusion:ChartSeries Label="Series 1" Data="1 3 2 7 3 2"/>
    <syncfusion:ChartSeries Label="Series 2" Data="1 5 2 7 3 6"/>
    <syncfusion:ChartSeries Label="Series 3" Data="1 2 2 6 3 1"/>
    <syncfusion:ChartSeries Label="Series 4" Data="1 5 2 3 3 8"/>
    <syncfusion:ChartSeries Label="Series 5" Data="1 7 2 3 3 4"/>
    <syncfusion:ChartSeries Label="Series 6" Data="1 5 2 2 3 3"/>
    </syncfusion:ChartArea>
    </syncfusion:Chart.Areas>
    </syncfusion:Chart>
    </Window>

    See Also
    ChartArea
    ChartSeries

    ElementMargin

    Gets or sets the legend's items margin. This is a dependency property.

    Declaration
    public Thickness ElementMargin { get; set; }
    Property Value
    Type Description
    System.Windows.Thickness

    The element margin.

    Examples

    C#:

    public Window1()
    {
    InitializeComponent();
    //Creating a new chart instance.
    Chart chart = new Chart();
    //Creating a chart legend.
    ChartLegend legend = new ChartLegend();
    //Setting rows and columns count.
    legend.ElementMargin = new Thickness(10,3,2,5);
    //Setting legend's attached ChartDock property.
    ChartDockPanel.SetDock(legend, ChartDock.Left);
    //Adding legend to chart.
    chart.Legends.Add(legend);
    //Adding area to chart.
    chart.Areas.Add(new ChartArea());
    //Creating new chart data points.
    ChartListData data = new ChartListData();
    data.Add(new ChartPoint(1, 3));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 2));
    //Creating new series.
    ChartSeries series1 = new ChartSeries();
    //Assigning series' label.
    series1.Label = "Series 1";
    //Assigning data.
    series1.Data = data;
    //Adding series to area.
    chart.Areas[0].Series.Add(series1);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 5));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 6));
    //Creating second series.
    ChartSeries series2 = new ChartSeries();
    //Assigning series' label.
    series2.Label = "Series 2";
    series2.Data = data;
    chart.Areas[0].Series.Add(series2);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 2));
    data.Add(new ChartPoint(2, 3));
    data.Add(new ChartPoint(3, 7));
    //Creating second series.
    ChartSeries series3 = new ChartSeries();
    //Assigning series' label.
    series3.Label = "Series 3";
    series3.Data = data;
    chart.Areas[0].Series.Add(series3);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 7));
    data.Add(new ChartPoint(2, 2));
    data.Add(new ChartPoint(3, 5));
    //Creating second series.
    ChartSeries series4 = new ChartSeries();
    //Assigning series' label.
    series4.Label = "Series 4";
    series4.Data = data;
    chart.Areas[0].Series.Add(series4);
    //Setting window's content.
    this.Content = chart;
    }
    XAML:
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Title="Window1" Height="500" Width="500"
    WindowStartupLocation="CenterScreen">
    <syncfusion:Chart
    xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
    <syncfusion:Chart.Legends>
    <syncfusion:ChartLegend ElementMargin="10,3,2,5"/>
    </syncfusion:Chart.Legends>
    <syncfusion:Chart.Areas>
    <syncfusion:ChartArea>
    <syncfusion:ChartSeries Label="Series 1" Data="1 3 2 7 3 2"/>
    <syncfusion:ChartSeries Label="Series 2" Data="1 5 2 7 3 6"/>
    <syncfusion:ChartSeries Label="Series 3" Data="1 2 2 6 3 1"/>
    <syncfusion:ChartSeries Label="Series 4" Data="1 5 2 3 3 8"/>
    <syncfusion:ChartSeries Label="Series 5" Data="1 7 2 3 3 4"/>
    <syncfusion:ChartSeries Label="Series 6" Data="1 5 2 2 3 3"/>
    </syncfusion:ChartArea>
    </syncfusion:Chart.Areas>
    </syncfusion:Chart>
    </Window>

    See Also
    ChartArea
    ChartSeries

    HorizontalContentAlignment

    Gets or sets the HorizontalContentAlignment.

    Declaration
    public HorizontalAlignment HorizontalContentAlignment { get; set; }
    Property Value
    Type Description
    System.Windows.HorizontalAlignment

    Horizontal Alignement

    IconHeight

    Gets or sets the height of the icon that represents series (segment). This is a dependency property.

    Declaration
    public double IconHeight { get; set; }
    Property Value
    Type Description
    System.Double

    The height of the icon.

    Examples

    C#:

    public Window1()
    {
    InitializeComponent();
    //Creating a new chart instance.
    Chart chart = new Chart();
    //Creating a chart legend.
    ChartLegend legend = new ChartLegend();
    //Setting rows and columns count.
    legend.IconHeight = 20;
    //Setting legend's attached ChartDock property.
    ChartDockPanel.SetDock(legend, ChartDock.Left);
    //Adding legend to chart.
    chart.Legends.Add(legend);
    //Adding area to chart.
    chart.Areas.Add(new ChartArea());
    //Creating new chart data points.
    ChartListData data = new ChartListData();
    data.Add(new ChartPoint(1, 3));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 2));
    //Creating new series.
    ChartSeries series1 = new ChartSeries();
    //Assigning series' label.
    series1.Label = "Series 1";
    //Assigning data.
    series1.Data = data;
    //Adding series to area.
    chart.Areas[0].Series.Add(series1);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 5));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 6));
    //Creating second series.
    ChartSeries series2 = new ChartSeries();
    //Assigning series' label.
    series2.Label = "Series 2";
    series2.Data = data;
    chart.Areas[0].Series.Add(series2);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 2));
    data.Add(new ChartPoint(2, 3));
    data.Add(new ChartPoint(3, 7));
    //Creating second series.
    ChartSeries series3 = new ChartSeries();
    //Assigning series' label.
    series3.Label = "Series 3";
    series3.Data = data;
    chart.Areas[0].Series.Add(series3);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 7));
    data.Add(new ChartPoint(2, 2));
    data.Add(new ChartPoint(3, 5));
    //Creating second series.
    ChartSeries series4 = new ChartSeries();
    //Assigning series' label.
    series4.Label = "Series 4";
    series4.Data = data;
    chart.Areas[0].Series.Add(series4);
    //Setting window's content.
    this.Content = chart;
    }
    XAML:
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Title="Window1" Height="500" Width="500"
    WindowStartupLocation="CenterScreen">
    <syncfusion:Chart
    xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
    <syncfusion:Chart.Legends>
    <syncfusion:ChartLegend IconHeight="20"/>
    </syncfusion:Chart.Legends>
    <syncfusion:Chart.Areas>
    <syncfusion:ChartArea>
    <syncfusion:ChartSeries Label="Series 1" Data="1 3 2 7 3 2"/>
    <syncfusion:ChartSeries Label="Series 2" Data="1 5 2 7 3 6"/>
    <syncfusion:ChartSeries Label="Series 3" Data="1 2 2 6 3 1"/>
    <syncfusion:ChartSeries Label="Series 4" Data="1 5 2 3 3 8"/>
    <syncfusion:ChartSeries Label="Series 5" Data="1 7 2 3 3 4"/>
    <syncfusion:ChartSeries Label="Series 6" Data="1 5 2 2 3 3"/>
    </syncfusion:ChartArea>
    </syncfusion:Chart.Areas>
    </syncfusion:Chart>
    </Window>

    See Also
    ChartArea
    ChartSeries

    IconVisibility

    Gets or sets a value indicating whether the icons of the legend items is visible. This is a dependency property.

    Declaration
    public Visibility IconVisibility { get; set; }
    Property Value
    Type Description
    System.Windows.Visibility

    The icon visibility.

    Remarks

    Double clicking on legend will make a legend's dialog window appear that can also be used to change icons visibility.

    Examples

    C#:

    public Window1()
    {
    InitializeComponent();
    //Creating a new chart instance.
    Chart chart = new Chart();
    //Creating a chart legend.
    ChartLegend legend = new ChartLegend();
    //Setting rows and columns count.
    legend.IconVisibility = Visibility.Visible;
    //Setting legend's attached ChartDock property.
    ChartDockPanel.SetDock(legend, ChartDock.Left);
    //Adding legend to chart.
    chart.Legends.Add(legend);
    //Adding area to chart.
    chart.Areas.Add(new ChartArea());
    //Creating new chart data points.
    ChartListData data = new ChartListData();
    data.Add(new ChartPoint(1, 3));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 2));
    //Creating new series.
    ChartSeries series1 = new ChartSeries();
    //Assigning series' label.
    series1.Label = "Series 1";
    //Assigning data.
    series1.Data = data;
    //Adding series to area.
    chart.Areas[0].Series.Add(series1);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 5));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 6));
    //Creating second series.
    ChartSeries series2 = new ChartSeries();
    //Assigning series' label.
    series2.Label = "Series 2";
    series2.Data = data;
    chart.Areas[0].Series.Add(series2);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 2));
    data.Add(new ChartPoint(2, 3));
    data.Add(new ChartPoint(3, 7));
    //Creating second series.
    ChartSeries series3 = new ChartSeries();
    //Assigning series' label.
    series3.Label = "Series 3";
    series3.Data = data;
    chart.Areas[0].Series.Add(series3);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 7));
    data.Add(new ChartPoint(2, 2));
    data.Add(new ChartPoint(3, 5));
    //Creating second series.
    ChartSeries series4 = new ChartSeries();
    //Assigning series' label.
    series4.Label = "Series 4";
    series4.Data = data;
    chart.Areas[0].Series.Add(series4);
    //Setting window's content.
    this.Content = chart;
    }
    XAML:
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Title="Window1" Height="500" Width="500"
    WindowStartupLocation="CenterScreen">
    <syncfusion:Chart
    xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
    <syncfusion:Chart.Legends>
    <syncfusion:ChartLegend IconVisibility="Visible"/>
    </syncfusion:Chart.Legends>
    <syncfusion:Chart.Areas>
    <syncfusion:ChartArea>
    <syncfusion:ChartSeries Label="Series 1" Data="1 3 2 7 3 2"/>
    <syncfusion:ChartSeries Label="Series 2" Data="1 5 2 7 3 6"/>
    <syncfusion:ChartSeries Label="Series 3" Data="1 2 2 6 3 1"/>
    <syncfusion:ChartSeries Label="Series 4" Data="1 5 2 3 3 8"/>
    <syncfusion:ChartSeries Label="Series 5" Data="1 7 2 3 3 4"/>
    <syncfusion:ChartSeries Label="Series 6" Data="1 5 2 2 3 3"/>
    </syncfusion:ChartArea>
    </syncfusion:Chart.Areas>
    </syncfusion:Chart>
    </Window>

    See Also
    ChartArea
    ChartSeries

    IconWidth

    Gets or sets the width of the icon that represents series (segment). This is a dependency property.

    Declaration
    public double IconWidth { get; set; }
    Property Value
    Type Description
    System.Double

    The width of the icon.

    Examples

    C#:

    public Window1()
    {
    InitializeComponent();
    //Creating a new chart instance.
    Chart chart = new Chart();
    //Creating a chart legend.
    ChartLegend legend = new ChartLegend();
    //Setting rows and columns count.
    legend.IconWidth = 20;
    //Setting legend's attached ChartDock property.
    ChartDockPanel.SetDock(legend, ChartDock.Left);
    //Adding legend to chart.
    chart.Legends.Add(legend);
    //Adding area to chart.
    chart.Areas.Add(new ChartArea());
    //Creating new chart data points.
    ChartListData data = new ChartListData();
    data.Add(new ChartPoint(1, 3));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 2));
    //Creating new series.
    ChartSeries series1 = new ChartSeries();
    //Assigning series' label.
    series1.Label = "Series 1";
    //Assigning data.
    series1.Data = data;
    //Adding series to area.
    chart.Areas[0].Series.Add(series1);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 5));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 6));
    //Creating second series.
    ChartSeries series2 = new ChartSeries();
    //Assigning series' label.
    series2.Label = "Series 2";
    series2.Data = data;
    chart.Areas[0].Series.Add(series2);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 2));
    data.Add(new ChartPoint(2, 3));
    data.Add(new ChartPoint(3, 7));
    //Creating second series.
    ChartSeries series3 = new ChartSeries();
    //Assigning series' label.
    series3.Label = "Series 3";
    series3.Data = data;
    chart.Areas[0].Series.Add(series3);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 7));
    data.Add(new ChartPoint(2, 2));
    data.Add(new ChartPoint(3, 5));
    //Creating second series.
    ChartSeries series4 = new ChartSeries();
    //Assigning series' label.
    series4.Label = "Series 4";
    series4.Data = data;
    chart.Areas[0].Series.Add(series4);
    //Setting window's content.
    this.Content = chart;
    }
    XAML:
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Title="Window1" Height="500" Width="500"
    WindowStartupLocation="CenterScreen">
    <syncfusion:Chart
    xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
    <syncfusion:Chart.Legends>
    <syncfusion:ChartLegend IconWidth="20"/>
    </syncfusion:Chart.Legends>
    <syncfusion:Chart.Areas>
    <syncfusion:ChartArea>
    <syncfusion:ChartSeries Label="Series 1" Data="1 3 2 7 3 2"/>
    <syncfusion:ChartSeries Label="Series 2" Data="1 5 2 7 3 6"/>
    <syncfusion:ChartSeries Label="Series 3" Data="1 2 2 6 3 1"/>
    <syncfusion:ChartSeries Label="Series 4" Data="1 5 2 3 3 8"/>
    <syncfusion:ChartSeries Label="Series 5" Data="1 7 2 3 3 4"/>
    <syncfusion:ChartSeries Label="Series 6" Data="1 5 2 2 3 3"/>
    </syncfusion:ChartArea>
    </syncfusion:Chart.Areas>
    </syncfusion:Chart>
    </Window>

    See Also
    ChartArea
    ChartSeries

    IsLegacyLegendStyleEnabled

    Gets or sets a value whether the LegacyLegendStyle remains unchanged. This is a dependency property.

    Declaration
    public bool IsLegacyLegendStyleEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsSegmentsLegend

    Get or Set IsSegmentsLegendProperty

    Declaration
    public bool IsSegmentsLegend { get; set; }
    Property Value
    Type Description
    System.Boolean

    ItemMargin

    Gets or sets the legend items' margin. This is a dependency property.

    Declaration
    public Thickness ItemMargin { get; set; }
    Property Value
    Type Description
    System.Windows.Thickness

    Items

    The serialization using xaml writer will include the ChartSeries (ChartLegend's Item property) in the serialized string, if this property is not included with DesignerSerializationVisibility attribute. the absence of this attribute may result in conflicting with default series of Chart Area.

    Declaration
    public ItemCollection Items { get; }
    Property Value
    Type Description
    System.Windows.Controls.ItemCollection

    LegendItemsPanel

    Gets or sets the Custom Legend ItemsPanel.

    Declaration
    public ItemsPanelTemplate LegendItemsPanel { get; set; }
    Property Value
    Type Description
    System.Windows.Controls.ItemsPanelTemplate

    The LegendItemsPanel

    LegendPanel

    Get or Set LegendPanelProperty

    Declaration
    public LegendPanelTypes LegendPanel { get; set; }
    Property Value
    Type Description
    LegendPanelTypes

    OffsetX

    Gets or sets the OffsetX value.

    Declaration
    public double OffsetX { get; set; }
    Property Value
    Type Description
    System.Double

    The OffsetX.

    OffsetY

    Gets or sets the OffsetY value.

    Declaration
    public double OffsetY { get; set; }
    Property Value
    Type Description
    System.Double

    The OffsetY.

    Orientation

    Gets or sets the orientation of items in the legend. This is a dependency property.

    Declaration
    public Orientation Orientation { get; set; }
    Property Value
    Type Description
    System.Windows.Controls.Orientation

    The orientation.

    Examples

    C#:

    public Window1()
    {
    InitializeComponent();
    //Creating a new chart instance.
    Chart chart = new Chart();
    //Creating a chart legend.
    ChartLegend legend = new ChartLegend();
    //Setting rows and columns count.
    legend.RowsCount = legend.ColumnsCount = 2;
    //Setting legend's attached ChartDock property.
    ChartDockPanel.SetDock(legend, ChartDock.Left);
    //Adding legend to chart.
    chart.Legends.Add(legend);
    //Adding area to chart.
    chart.Areas.Add(new ChartArea());
    //Creating new chart data points.
    ChartListData data = new ChartListData();
    data.Add(new ChartPoint(1, 3));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 2));
    //Creating new series.
    ChartSeries series1 = new ChartSeries();
    //Assigning series' label.
    series1.Label = "Series 1";
    //Assigning data.
    series1.Data = data;
    //Adding series to area.
    chart.Areas[0].Series.Add(series1);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 5));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 6));
    //Creating second series.
    ChartSeries series2 = new ChartSeries();
    //Assigning series' label.
    series2.Label = "Series 2";
    series2.Data = data;
    chart.Areas[0].Series.Add(series2);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 2));
    data.Add(new ChartPoint(2, 3));
    data.Add(new ChartPoint(3, 7));
    //Creating second series.
    ChartSeries series3 = new ChartSeries();
    //Assigning series' label.
    series3.Label = "Series 3";
    series3.Data = data;
    chart.Areas[0].Series.Add(series3);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 7));
    data.Add(new ChartPoint(2, 2));
    data.Add(new ChartPoint(3, 5));
    //Creating second series.
    ChartSeries series4 = new ChartSeries();
    //Assigning series' label.
    series4.Label = "Series 4";
    series4.Data = data;
    chart.Areas[0].Series.Add(series4);
    //Setting window's content.
    this.Content = chart;
    }
    XAML:
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Title="Window1" Height="500" Width="500"
    WindowStartupLocation="CenterScreen">
    <syncfusion:Chart
    xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
    <syncfusion:Chart.Legends>
    <syncfusion:ChartLegend Orientation="Horizontal"/>
    </syncfusion:Chart.Legends>
    <syncfusion:Chart.Areas>
    <syncfusion:ChartArea>
    <syncfusion:ChartSeries Label="Series 1" Data="1 3 2 7 3 2"/>
    <syncfusion:ChartSeries Label="Series 2" Data="1 5 2 7 3 6"/>
    <syncfusion:ChartSeries Label="Series 3" Data="1 2 2 6 3 1"/>
    <syncfusion:ChartSeries Label="Series 4" Data="1 5 2 3 3 8"/>
    <syncfusion:ChartSeries Label="Series 5" Data="1 7 2 3 3 4"/>
    <syncfusion:ChartSeries Label="Series 6" Data="1 5 2 2 3 3"/>
    </syncfusion:ChartArea>
    </syncfusion:Chart.Areas>
    </syncfusion:Chart>
    </Window>

    See Also
    ChartArea
    ChartSeries
    OrientationSealedOnDock

    OrientationSealedOnDock

    Gets or sets a value indicating whether legend's orientation remains unchanged during dock. This is a dependency property.

    Declaration
    public bool OrientationSealedOnDock { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    By default, legend's items orientation will change with respect to legend's ChartDockPanel attached property. For legend's Top or Bottom dock state, items will be placed horizontally, for Right or Left - vertically.

    Examples

    C#:

    public Window1()
    {
    InitializeComponent();
    //Creating a new chart instance.
    Chart chart = new Chart();
    //Creating a chart legend.
    ChartLegend legend = new ChartLegend();
    //Setting legend's attached ChartDock property.
    ChartDockPanel.SetDock(legend, ChartDock.Left);
    //Adding legend to chart.
    chart.Legends.Add(legend);
    //Adding area to chart.
    chart.Areas.Add(new ChartArea());
    //Creating new chart data points.
    ChartListData data = new ChartListData();
    data.Add(new ChartPoint(1, 3));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 2));
    //Creating new series.
    ChartSeries series1 = new ChartSeries();
    //Assigning series' label.
    series1.Label = "Series 1";
    //Assigning data.
    series1.Data = data;
    //Adding series to area.
    chart.Areas[0].Series.Add(series1);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 5));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 6));
    //Creating second series.
    ChartSeries series2 = new ChartSeries();
    //Assigning series' label.
    series2.Label = "Series 2";
    series2.Data = data;
    chart.Areas[0].Series.Add(series2);
    //Setting window's content.
    this.Content = chart;
    }
    XAML:
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Height="300" Width="300" WindowStartupLocation="CenterScreen">
    <syncfusion:Chart
    xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
    <syncfusion:Chart.Legends>
    <syncfusion:ChartLegend OrientationSealedOnDock="True"/>
    </syncfusion:Chart.Legends>
    <syncfusion:Chart.Areas>
    <syncfusion:ChartArea>
    <syncfusion:ChartSeries Label="Series 1" Data="1 3 2 7 3 2"/>
    <syncfusion:ChartSeries Label="Series 2" Data="1 5 2 7 3 6"/>
    </syncfusion:ChartArea>
    </syncfusion:Chart.Areas>
    </syncfusion:Chart>
    </Window>

    See Also
    ChartDockPanel
    ChartArea
    ChartSeries

    RowsCount

    Gets or sets the number of rows to be used for items in the legend. This is a dependency property.

    Declaration
    public int RowsCount { get; set; }
    Property Value
    Type Description
    System.Int32

    The rows count.

    Examples

    XAML:

    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Height="500" Width="500" WindowStartupLocation="CenterScreen">
    <syncfusion:Chart xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
       <syncfusion:Chart.Legends>
           <syncfusion:ChartLegend RowsCount="2" ColumnsCount="3"/>
       </syncfusion:Chart.Legends>
       <syncfusion:Chart.Areas>
           <syncfusion:ChartArea>
               <syncfusion:ChartSeries Label="Series 1" Data="1 3 2 7 3 2"/>
               <syncfusion:ChartSeries Label="Series 2" Data="1 5 2 7 3 6"/>
               <syncfusion:ChartSeries Label="Series 3" Data="1 2 2 6 3 1"/>
               <syncfusion:ChartSeries Label="Series 4" Data="1 5 2 3 3 8"/>
               <syncfusion:ChartSeries Label="Series 5" Data="1 7 2 3 3 4"/>
               <syncfusion:ChartSeries Label="Series 6" Data="1 5 2 2 3 3"/>
           </syncfusion:ChartArea>
       </syncfusion:Chart.Areas>
    </syncfusion:Chart>
    </Window>
    See Also
    ChartArea
    ChartSeries

    ShowSymbol

    Gets or sets the show symbol.

    Declaration
    public Visibility ShowSymbol { get; set; }
    Property Value
    Type Description
    System.Windows.Visibility

    The show symbol.

    TextAlignment

    Gets or sets the text alignment. This is a dependency property.

    Declaration
    public VerticalAlignment TextAlignment { get; set; }
    Property Value
    Type Description
    System.Windows.VerticalAlignment

    The text alignment.

    Examples

    C#:

    public Window1()
    {
    InitializeComponent();
    //Creating a new chart instance.
    Chart chart = new Chart();
    //Creating a chart legend.
    ChartLegend legend = new ChartLegend();
    //Setting rows and columns count.
    legend.TextAlignment = VerticalAlignment.Bottom;
    //Setting legend's attached ChartDock property.
    ChartDockPanel.SetDock(legend, ChartDock.Left);
    //Adding legend to chart.
    chart.Legends.Add(legend);
    //Adding area to chart.
    chart.Areas.Add(new ChartArea());
    //Creating new chart data points.
    ChartListData data = new ChartListData();
    data.Add(new ChartPoint(1, 3));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 2));
    //Creating new series.
    ChartSeries series1 = new ChartSeries();
    //Assigning series' label.
    series1.Label = "Series 1";
    //Assigning data.
    series1.Data = data;
    //Adding series to area.
    chart.Areas[0].Series.Add(series1);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 5));
    data.Add(new ChartPoint(2, 7));
    data.Add(new ChartPoint(3, 6));
    //Creating second series.
    ChartSeries series2 = new ChartSeries();
    //Assigning series' label.
    series2.Label = "Series 2";
    series2.Data = data;
    chart.Areas[0].Series.Add(series2);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 2));
    data.Add(new ChartPoint(2, 3));
    data.Add(new ChartPoint(3, 7));
    //Creating second series.
    ChartSeries series3 = new ChartSeries();
    //Assigning series' label.
    series3.Label = "Series 3";
    series3.Data = data;
    chart.Areas[0].Series.Add(series3);
    //Making a new data points.
    data = new ChartListData();
    data.Add(new ChartPoint(1, 7));
    data.Add(new ChartPoint(2, 2));
    data.Add(new ChartPoint(3, 5));
    //Creating second series.
    ChartSeries series4 = new ChartSeries();
    //Assigning series' label.
    series4.Label = "Series 4";
    series4.Data = data;
    chart.Areas[0].Series.Add(series4);
    //Setting window's content.
    this.Content = chart;
    }
    XAML:
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Title="Window1" Height="500" Width="500"
    WindowStartupLocation="CenterScreen">
    <syncfusion:Chart
    xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
    <syncfusion:Chart.Legends>
    <syncfusion:ChartLegend TextAlignment="Bottom"/>
    </syncfusion:Chart.Legends>
    <syncfusion:Chart.Areas>
    <syncfusion:ChartArea>
    <syncfusion:ChartSeries Label="Series 1" Data="1 3 2 7 3 2"/>
    <syncfusion:ChartSeries Label="Series 2" Data="1 5 2 7 3 6"/>
    <syncfusion:ChartSeries Label="Series 3" Data="1 2 2 6 3 1"/>
    <syncfusion:ChartSeries Label="Series 4" Data="1 5 2 3 3 8"/>
    <syncfusion:ChartSeries Label="Series 5" Data="1 7 2 3 3 4"/>
    <syncfusion:ChartSeries Label="Series 6" Data="1 5 2 2 3 3"/>
    </syncfusion:ChartArea>
    </syncfusion:Chart.Areas>
    </syncfusion:Chart>
    </Window>

    See Also
    ChartArea
    ChartSeries

    VerticalContentAlignment

    Gets or sets VerticalContentAlignement.

    Declaration
    public VerticalAlignment VerticalContentAlignment { get; set; }
    Property Value
    Type Description
    System.Windows.VerticalAlignment

    ertical Alignment

    Methods

    Deserialize(String)

    Method declaration for DeSerialize

    Declaration
    public object Deserialize(string xamlString)
    Parameters
    Type Name Description
    System.String xamlString
    Returns
    Type Description
    System.Object

    OnCreateAutomationPeer()

    Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

    Declaration
    protected override AutomationPeer OnCreateAutomationPeer()
    Returns
    Type Description
    System.Windows.Automation.Peers.AutomationPeer

    The type-specific System.Windows.Automation.Peers.AutomationPeer implementation.

    OnLegendItemsPanelChanged(DependencyObject, DependencyPropertyChangedEventArgs)

    Called when LegendItemsPanel property is changed.

    Declaration
    public static void OnLegendItemsPanelChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyObject d

    The d value.

    System.Windows.DependencyPropertyChangedEventArgs args

    The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

    OnMouseDoubleClick(MouseButtonEventArgs)

    Raises the System.Windows.Controls.Control.MouseDoubleClick event.

    Declaration
    protected override void OnMouseDoubleClick(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    The event data.

    OnMouseMove(MouseEventArgs)

    Invoked when an unhandled System.Windows.Input.Mouse.MouseMove�attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    The System.Windows.Input.MouseEventArgs that contains the event data.

    OnPanelChanged(DependencyObject, DependencyPropertyChangedEventArgs)

    Method implementation for Panel assigned to legend

    Declaration
    public static void OnPanelChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyObject d
    System.Windows.DependencyPropertyChangedEventArgs args

    OnPropertyChanged(DependencyPropertyChangedEventArgs)

    Invoked whenever the effective value of any dependency property on this System.Windows.FrameworkElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs).

    Declaration
    protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    The event data that describes the property that changed, as well as old and new values.

    Serialize()

    Method declaration for Serialize

    Declaration
    public string Serialize()
    Returns
    Type Description
    System.String

    Events

    LocationChanged

    Represents event for QtpLegendLocationChangedEventHandler.

    Declaration
    public event QtpLegendLocationChangedEventHandler LocationChanged
    Event Type
    Type Description
    QtpLegendLocationChangedEventHandler

    Implements

    IChartSerializer

    See Also

    ChartArea
    ChartSeries
    ChartDockPanel
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved