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

Change Pie Chart Color Series

1 Answer 296 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Gabriel
Top achievements
Rank 1
Gabriel asked on 23 Jul 2013, 04:28 AM
I am using Q1 2013 (before the addition of the CategorySeriesItem class, etc.) and am wondering if there is a method equivelant to http://www.telerik.com/help/aspnet-ajax/htmlchart-application-using-multiple-custom-colors.html for my situation.

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 25 Jul 2013, 05:52 PM
Hello Gabriel,

Depending on the RadHtmlChart's implementation you can use the following approaches:
  • For programmatically created series items you can use the logic from the Using Multiple Custom Colors to Create Charts help article - create a static class that holds the colors, so that it can be iterated over to return the desired color according to their indexes - the index of the series can point to the index of its color.
  • For a databound chart you can create an additional column in the datasource that will store the colors for the series. Then you can use the ColorField property for each series type, in order to reference this field/column. Such an example is illustrated in this demo.

Note also that since Q2 2013 SP1 RadHtmlChart has 10 built-in colors for the series for each skin.



Regards,
Danail Vasilev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Chart (HTML5)
Asked by
Gabriel
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or