Stacked Column Chart with custom colors

2 posts, 0 answers
  1. DJ Laycock
    DJ Laycock avatar
    1 posts
    Member since:
    Sep 2009

    Posted 15 Sep 2010 Link to this post

    I've got a data set that needs to be displayed as a set of stacked columns.

    So far so good, now the tricky part.

    The values in a given stack may belong to a different data set:

    e.g.

    1st value belongs to set A,

    2nd value belongs to set B,

    3rd value belongs to set C

    4th value belongs to set B

    5th value belongs to set A

    If we say A is Red, B is Green, and C is Blue the stacked bars need to be

    Red

    Green

    Blue

    Green

    Red

     

    Is there any way to accomplish this?

  2. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 20 Sep 2010 Link to this post

    Hi,

    This is how you can create your own palette for RadChart:

    Palette palette = new Palette("MyPalette");
    palette.Items.Add(new PaletteItem(Color.Red, Color.Red));
    palette.Items.Add(new PaletteItem(Color.Green, Color.Green));
    palette.Items.Add(new PaletteItem(Color.Blue, Color.Blue));
    palette.Items.Add(new PaletteItem(Color.Green, Color.Green));
    palette.Items.Add(new PaletteItem(Color.Red, Color.Red));
      
    RadChart1.CustomPalettes.Add(palette);
    RadChart1.SeriesPalette = "MyPalette";



    Best regards,
    Ves
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top