Changing Chart Foreground Color

3 posts, 1 answers
  1. Michael
    Michael avatar
    6 posts
    Member since:
    May 2009

    Posted 24 Jun 2009 Link to this post

    I need to change the background color of a Doughnut and StackedBarChart to white and the foreground color to black. (Foreground being legend text as well as data label text in the actual chart area.)  I haven't been able to conveniently change the foreground color of the whole chart. As in, I need to change the color of all text on the chart.

    Changing a Legend Item's font color is found here and appears to work appropriately.  However, this doesn't change the Legend Title's, nor the data font colors.

    Any help is greatly appreciated.

    Thanks!

  2. Answer
    Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 26 Jun 2009 Link to this post

    Hello Michael,

    Please, find the answer to your questions in the support ticket you opened.

    Kind regards,
    Evtim
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Michael
    Michael avatar
    6 posts
    Member since:
    May 2009

    Posted 26 Jun 2009 Link to this post

    For general information:

    "Hello Michael,

    To change the background of the chart, you can use something like:
    this.radChart1.Background = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.White); 

    There is no common approach to changing the text color all over the chart. You will need to change the color for each of the desired elements. In order to be able to do that easily, I suggest upgrading to Q2  version (scheduled next week for release). We added Appearance property for each series definition and to most visible elements to allow simpler customizations without the need to fully rewrite templates and styles.

    Please, refer to the RadChart MVVM example for more information on how to control the series' appearance."

    Thanks.
Back to Top