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

Stacked Column Chart with custom colors

1 Answer 116 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
DJ Laycock
Top achievements
Rank 1
DJ Laycock asked on 15 Sep 2010, 07:51 PM

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?

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 20 Sep 2010, 03:03 PM
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
Tags
Chart (obsolete as of Q1 2013)
Asked by
DJ Laycock
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or