Programatically Change Series Items' Background Color

4 posts, 0 answers
  1. Gabriel
    Gabriel avatar
    4 posts
    Member since:
    Jan 2013

    Posted 14 Aug 2013 Link to this post

    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!
  2. Stamo Gochev
    Admin
    Stamo Gochev avatar
    157 posts

    Posted 19 Aug 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Gabriel
    Gabriel avatar
    4 posts
    Member since:
    Jan 2013

    Posted 19 Aug 2013 Link to this post

    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.
  5. Stamo Gochev
    Admin
    Stamo Gochev avatar
    157 posts

    Posted 21 Aug 2013 Link to this post

    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.
Back to Top