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

Programatically Change Series Items' Background Color

3 Answers 185 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Gabriel
Top achievements
Rank 1
Gabriel asked on 14 Aug 2013, 08:15 PM
I am aware of the ability to use a DB field for this, as well as this article which gets close to a solution, but neither is sufficient for my purposes. Is there a property like BackgroundColor for anything other than the items in a PieSeries? I just want to be able to set each piece of data's color separately. Thanks!

3 Answers, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 19 Aug 2013, 09:47 AM
Hello Gabriel,

Could you give me further details on what you mean by "to set each piece of data's color separately" as this could be done with the BackgroundColor property of PieSeriesItem or with the ColorField property in a datb bound chart?  Furthermore, could you specify for which chart's elements (other than SeriesItems) do you need a BackgroundColor property?

Your clarification would allow me to give you further details on the case.

Regards,
Stamo Gochev
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.
0
Gabriel
Top achievements
Rank 1
answered on 19 Aug 2013, 09:56 AM
I want the color for certain pieces of data to be a certain color. I want ALL charts to have differing colors, not just pie and I want it done programmatically.
0
Stamo Gochev
Telerik team
answered on 21 Aug 2013, 07:27 AM
Hello Gabriel,

If I have understood you correctly, you want to set certain colors for some of the SeriesItems in a PieSeries, am I correct? If this is the case, then you can use the ColorField property as I suggested in my previous answer.

On the other hand, If you have more than one RadHtmlChart in your page and you can set different Skins for each of them which would style all the charts in
a different way. You can have a look at the list of available skins here and set the skin of the RadHtmlChart like this:
<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Skin="Metro">
If this is not the type of appearance you want to achieve, could you give me a detailed explanation on which chart elements you want to colorize? A sample page with your RadHtmlChart's definition would also be very helpful.

Regards,
Stamo Gochev
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
Stamo Gochev
Telerik team
Gabriel
Top achievements
Rank 1
Share this question
or