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

Assign Static Colors Across Pie Charts?

1 Answer 90 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
DH
Top achievements
Rank 1
DH asked on 20 Feb 2015, 07:47 PM
Is it possible to assign static colors across the pie chart. For example, i have 2 pie charts, on each chart the data corresponds to a user. However in each chart the color is seemingly randomly assigned. I would like to make it static in such a way that user1 will have the same color between the two pie charts, the particular color does not matter. 

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 23 Feb 2015, 11:57 AM
Hi DH,

For a declaratively created chart you can hard code colors in the Color property of the series items. See an example in the HtmlChart - Pie Chart demo.

For a data-bound chart you can use the ColorField property of the series that refers the corresponding data source field with the colors. See an example in the HtmlChart - Conditional Item Colorization demo.

Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Chart (HTML5)
Asked by
DH
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or