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

Default Color Palette?

3 Answers 121 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Jacky Sze
Top achievements
Rank 1
Jacky Sze asked on 21 Jun 2012, 07:21 AM
I'm trying to create a PieSeries and bind to my data sources in code behind and I have to specify the color for each SeriesItem one by one. Otherwise, the chart is rendered without color. Is there any option for applying  a default color from the palette for each SeriesItem automatically?

EDIT: Color can be automatically assigned now after specifying the skin name property. There was no color at the beginning because we have used a custom skin.

Another question is how can we put SeriesItem names into the PieSeries labels? i.e. I want to display "Name - Value" instead of just "Value" in the chart.

3 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 22 Jun 2012, 12:40 PM
Hi Jacky,

On the subject of colours - the RadHtmlChart uses a different skinning mechanism than the rest of the RadControls, so for the time being you would need to use its built-in skins and colours or create the items programmatically so you can choose their colours, as you have discovered.

On  the subject of tooltips and labels - currently this functionality is not available. We are considering extending this functionality and once it is finalized and released information about it will be available in the release notes.

Kind regards,
Marin Bratanov
the Telerik team
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 their blog feed now.
0
Jacky Sze
Top achievements
Rank 1
answered on 25 Jun 2012, 03:52 AM
It will be good if the next release can provide more color combinations for a skin. Default skin only provides 4 to 5 colors for data in different series. We have more than 10 series and have to create the items programatically. 
0
Marin Bratanov
Telerik team
answered on 27 Jun 2012, 12:39 PM
Hi Jacky,

We are considering this improvement and we will perhaps add up to 10 different colors.  The main problem with this logic is that even 20 colors may not be enough for some particular case, so adding more and more each time is not an option that can solve all situations.

For the time being you can set the BackgroundColor property under Appearance -> FillStyle for each series when you create it. You can prepare an array with the values you wish to use and use the series index to match it to the index in this array.


Regards,
Marin Bratanov
the Telerik team
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 their blog feed now.
Tags
Chart (HTML5)
Asked by
Jacky Sze
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Jacky Sze
Top achievements
Rank 1
Share this question
or