We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to format the legend text?

Platform: WPF |
Control: SfChart |
Published Date: April 24, 2015 |
Last Revised Date: June 27, 2019


This article describes the available customization for chart legends.


You can format the legend text by using its default customization APIs as follows.


<chart:ChartLegend x:Name="Legend1" 
                        Header="Multiple Series"   
                        FontFamily="Bradley Hand ITC"


            ChartLegend legend2 = new ChartLegend();
            legend2.Header = "Multiple Series";
            legend2.FontFamily = new FontFamily("Bradley Hand ITC");
            legend2.FontSize = 20;
            legend2.FontStretch = FontStretches.Expanded;
            legend2.FontStyle = FontStyles.Italic;
            legend2.FontWeight = FontWeights.ExtraBold;
            legend2.Foreground = Brushes.DarkGreen;
            this.chart1.Legend = legend2;


The following screenshot illustrates the output for the formatted text of the legend.

Chart legend with formatted text in WPF

Figure 1: Formatted text of the legend.

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile