This is a migrated thread and some comments may be shown as answers.

Changing fonts

4 Answers 92 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Conrad
Top achievements
Rank 1
Conrad asked on 09 Nov 2009, 07:45 PM
Hi,

I'm looking for two things,
1.  To change the font to century gothic.  Which actually fonts work?
2.  To change the font family for the whole chart in one place.

Any help would be great.

4 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 09 Nov 2009, 09:40 PM
To change a font to Century Gothic you can do the following (example shows how to change the chart title):
 
RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font = new Font("Century Gothic", 15); 
I think any font that can be created using System.Drawing.Font can be applied to the RadChart.

I don't think you can change the font family of the entire chart in one setting - you have to do each one separately.
0
Conrad
Top achievements
Rank 1
answered on 10 Nov 2009, 06:04 AM
Thanks but did try it and it didn't work.  The problem was that Century Gothic is not a standard win2003serv font.  Installed and now it is working!

So there is no css or quick way to skin a chart?  There are quite a few charts in the application and don't want to have to set each element for each chart.
0
Schlurk
Top achievements
Rank 2
answered on 10 Nov 2009, 05:49 PM
I don't think there is a CSS way of defining a Chart (not one that I've found anyways) and aside from using the default Telerik skins and working around those you would have to follow this documentation article. I think the way the skins for RadChart works is similar to this example, it just does all the coding work for you.
0
Ves
Telerik team
answered on 11 Nov 2009, 12:27 PM
Guys,

CSS will not work for RadChart. You can check the page html -- RadChart is an image, generated on the server, so no CSS can be applied. Still, here is another hint -- you can style one of the charts, save your custom skin to .xml file and load it for all the charts in the site. For more details see this help topic.

Best regards,
Ves
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Chart (Obsolete)
Asked by
Conrad
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Conrad
Top achievements
Rank 1
Ves
Telerik team
Share this question
or