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

Changing Chart Foreground Color

2 Answers 185 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael
Top achievements
Rank 1
Michael asked on 24 Jun 2009, 08:28 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Dwight
Telerik team
answered on 26 Jun 2009, 07:31 AM
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.
0
Michael
Top achievements
Rank 1
answered on 26 Jun 2009, 02:27 PM
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.
Tags
Chart
Asked by
Michael
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Michael
Top achievements
Rank 1
Share this question
or