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

Can''t set font size of legend

Thread ID:

Created:

Updated:

Platform:

Replies:

102913 Mar 13,2012 01:24 PM UTC Mar 19,2012 05:21 AM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: Chart
Matthias Max
Asked On March 13, 2012 01:24 PM UTC

Hi,

I'm setting the font size of the legend like this:
cwcChart.Legend.Font.Name = "Sans-Serif"
cwcChart.Legend.Font.Size = New FontUnit(10, UnitType.Pixel)

The size will not be recognized by the chart though. Also when I don't set the size at all the value is "8pt" but its definitely much bigger than 8pt in the chart picture in the browser.

Is this a known bug?

My version: 10.1.0.44

Thanks


Sivakumar D [Syncfusion]
Replied On March 14, 2012 04:33 AM UTC

Hi Matthias,

Thanks for using Syncfusion products.

We are sorry for inconvenience caused. We are unable to reproduce the issue. We have prepared a simple sample for Chart Legend Font. The sample can be downloaded from the following link.

http://www.syncfusion.com/downloads/Support/DirectTrac/General/F102913-1513671456.zip

Could you please try the above sample and get back to us whether you are able to reproduce the issue? If not, could you please give more information or by reproducing the issue in the above sample so that we could sort out the issue and provide you with solution. The information provided would be of great help in resolving the issue.

Please let us know if any concerns.

Regards,
Siva



Matthias Max
Replied On March 15, 2012 05:52 PM UTC

HI, thanks for the reply. This works for me.

For some reason though, in my case the Font is way bigger then 10px. I tried to set it now to 8 px for a test. It then gets smaller like around the size in your example. I have to put 8 px though to make it work with this workaround. What aspects may lead to this behaviour?

Another question: How can I change the Icon of the legends to "straightline" for the seris without using custom icons?

Thakn you!


Sivakumar D [Syncfusion]
Replied On March 19, 2012 05:21 AM UTC

Hi Matthias,

Thanks for your update.

We deeply regret for inconvenience caused.

We are unable to reproduce the issue which was mentioned by you in the last response of this forum(legend font size not working properly in some cases).

We suggest you to use RepresentationType property of legend to customize the icon displayed in the legend.It Specifies how each legend item should be represented. Please refer below code snippet.

[C#]

this.ChartWebControl1.Legend.RepresentationType = ChartLegendRepresentationType.StraightLine;


For more information about customizing legend item image, Please refer our online documentation link given below.

http://help.syncfusion.com/Ug_101/User%20interface/Windows%20Forms/Chart/Documents/customizinglegenditemimage1.htm

For your convenience, we have modified the sample and the same can be downloaded from the following link.

http://www.syncfusion.com/downloads/Support/DirectTrac/General/F102913-15136714561486720867.zip

Please let me know if you have any other questions or concerns.

Regards,
Siva



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.

Please sign in to access our forum

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

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

;