Description This article describes the available customization for chart legends. Solution You can format the legend text by using its default customization APIs as follows. XAML <chart:ChartLegend x:Name="Legend1" Header="Multiple Series" FontFamily="Bradley Hand ITC" FontSize="20" FontStretch="Expanded" FontStyle="Italic" FontWeight="ExtraBold" Foreground="DarkGreen"/> C# 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; OutputThe following screenshot illustrates the output for the formatted text of the legend. Figure 1: Formatted text of the legend. |
This page will automatically be redirected to the sign-in page in 10 seconds.