Changing fonts

Thread is closed for posting
5 posts, 0 answers
  1. Conrad
    Conrad avatar
    11 posts
    Member since:
    May 2009

    Posted 09 Nov 2009 Link to this post

    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.
  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 09 Nov 2009 Link to this post

    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.
  3. Conrad
    Conrad avatar
    11 posts
    Member since:
    May 2009

    Posted 10 Nov 2009 Link to this post

    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.
  4. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 10 Nov 2009 Link to this post

    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.
  5. Ves
    Admin
    Ves avatar
    2927 posts

    Posted 11 Nov 2009 Link to this post

    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.
Back to Top