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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set chart legend font?

Thread ID:

Created:

Updated:

Platform:

Replies:

21922 Nov 29,2004 10:56 AM UTC Dec 1,2004 06:28 PM UTC WinForms 3
loading
Tags: Chart
Administrator [Syncfusion]
Asked On November 29, 2004 10:56 AM UTC

I have found the font property for the chart, primaryX and primaryY axes. I cannot find one for the legend! Is there one and where do I set it? If not, how can I make my legend have the same font as the rest of my chart at runtime? Also, I want the title of my chart to be large and bold without affecting the rest of the text (primary axes and legend). How can I do this?

Davis Jebaraj [Syncfusion]
Replied On November 29, 2004 08:44 PM UTC

Hi, Please refer to the sample linked to below for an example of changing the Legend Font and the Chart Title Font: http://www.syncfusion.com/support/user/uploads/f21922chartlegendfont.zip C# Code: private void Form1_Load(object sender, System.EventArgs e) { InitializeChartData(); this.chartControl1.Legend.FilterItems += new LegendFilterItemsEventHandler(this.FilterLegend); this.chartControl1.Font = new Font("Times New Roman" , 24.0f); } protected void FilterLegend(object sender, ChartLegendFilterItemsEventArgs args) { int legendCount = args.Items.Length; for(int i =0; i

Administrator [Syncfusion]
Replied On November 30, 2004 11:28 AM UTC

Thanks Davis, that works for me. Now, how can I do the same for the labels on the primary X and Y axes? How about the labels for each point in the series?

Davis Jebaraj [Syncfusion]
Replied On December 1, 2004 06:28 PM UTC

Hi, I have modified the sample to change the point fonts and the axes fonts: f21922ChartLegendFontRev1_9418.zip Regards, Davis

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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

;