Articles in this section
Category / Section

How to customize the icons of legends in WPF Chart (SfChart)?

1 min read

You can customize the label and icon of legends by using the Label and LegendIcon properties in WPF Chart (SfChart). The LegendIcon property is an enum property that holding the values like rectangle, circle, cross, etc.

Also, you can make the legend icon as thumbnail for series shapes by choosing the SeriesType as value for the LegendIcon property.

XAML

<syncfusion:SfChart.Legend>
      <syncfusion:ChartLegend/>
</syncfusion:SfChart.Legend>
<!--LegendIcon is set "SeriesType"-->
<syncfusion:LineSeries LegendIcon="SeriesType" Label="Series1" ItemsSource="{Binding Computers}" XBindingPath="Computer" YBindingPath="Year2013"/>

C#

this.sampleChart.Series[0].LegendIcon = ChartLegendIcon.SeriesType;

 

WPF Chart with Customized Legend Icons

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied