Syncfusion.SfChart.WPF
Members  Example 


ChartLegend Class

Represents legend for a SfChart.
Object Model
ChartLegend ClassChartSeriesBase Class
Syntax
'Declaration
 
<DefaultEventAttribute("OnItemsChanged")>
<DefaultPropertyAttribute("Items")>
<ContentPropertyAttribute("Items")>
<StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=System.Windows.FrameworkElement)>
<LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)>
<XmlLangPropertyAttribute("Language")>
<UsableDuringInitializationAttribute(True)>
<RuntimeNamePropertyAttribute("Name")>
<UidPropertyAttribute("Uid")>
<TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
<NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
Public Class ChartLegend 
   Inherits System.Windows.Controls.ItemsControl
   Implements ICloneable 
'Usage
 
Dim instance As ChartLegend
[DefaultEvent("OnItemsChanged")]
[DefaultProperty("Items")]
[ContentProperty("Items")]
[StyleTypedProperty(Property="ItemContainerStyle", StyleTargetType=System.Windows.FrameworkElement)]
[Localizability(LocalizationCategory.None, Readability=Readability.Unreadable)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public class ChartLegend : System.Windows.Controls.ItemsControl, ICloneable  
Remarks
Chart legend will be added as chart's child. Each item in legend contain key information about the ChartSeriesBase. Legend has all abilities such as docking, enabling or disabling desired series in a SfChart.
Example
<syncfusion:SfChart>
      <syncfusion:SfChart.Legend>
            <syncfusion:ChartLegend/>
      </syncfusion:SfChart.Legend>
      <syncfusion:Series/>
</syncfusion:SfChart >
ChartLegend chartLegend = new ChartLegend();
ChartArea.Legend = chartLegend;
Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  System.Windows.Controls.Control
                     System.Windows.Controls.ItemsControl
                        Syncfusion.UI.Xaml.Charts.ChartLegend

AssemblyVersion

Syncfusion.SfChart.WPF: 17.3460.0.26

See Also