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

change color of bars on bar graph

1 Answer 100 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Greg Sipes
Top achievements
Rank 1
Greg Sipes asked on 29 Apr 2010, 08:43 PM
Hello,
      I just recently started using Telerik controls for WPF and to be honest have found the documentation to be quite disorganized. It seems that everything wants to take you back to the demo project, which offers nothing but a sample of what the control CAN do, not how to do it, weird.....anyways, I am trying to do something very simple, which is to change the colors of the bars on a bar graph, or more generally, the colors of the lines on any type of graph. I have the graph working, it is data bound, and it looks great, but the default color of the bars make the graph blend in too much to the rest of the interface. Any suggestions?  It seems like is should be a simple property of the graph, but I cannot find it.

1 Answer, 1 is accepted

Sort by
0
Velin
Telerik team
answered on 05 May 2010, 08:40 AM
Hi Greg Sipes,

We are really sorry to hear that you find our documentation disorganized and not helpful enough. We are constantly making efforts to improve the existing documents and put new articles online and we hope that you will notice the progress over the time.

The fastest way to define custom colors for your visual series is to populate the RadChart.PaletteBrushes collection with as many brushes as you need. These will be automatically applied to the visual series in the order you have added them to the collection. Here is the sample code:
RadChart RadChart1 = new RadChart();
RadChart1.PaletteBrushes.Add(new SolidColorBrush(Colors.Black));
RadChart1.PaletteBrushes.Add(new SolidColorBrush(Colors.Yellow));
RadChart1.PaletteBrushes.Add(new SolidColorBrush(Colors.Green));

Here you can find more information on this matter.

Hope this will help.

Sincerely yours,
Velin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Chart
Asked by
Greg Sipes
Top achievements
Rank 1
Answers by
Velin
Telerik team
Share this question
or