Business Intelligence

Adding custom palettes to Dundas pie charts in .NET 3.5x

One of the new features in Dundas 6.x and above, is the ability to create custom palettes of colors and apply them to pie charts. This way you no longer have to settle for Dundas’s default fluffy colors. In order to change the color palette, create a Color array and assign it to the series like this:

Color[] clrSteps = new Color[] {
Color.Red,
Color.Green,
Color.Magenta,
Color.Blue,
Color.LightBlue,
Color.Coral,
Color.LightCyan,
Color.Goldenrod,
Color.Gray,
Color.GreenYellow,
Color.Honeydew,
Color.Ivory,
Color.Khaki,
Color.Lavender
};
yourPieChart.PaletteCustomColors = clrSteps;

Now your pie chart will start with red for the first slice, then continue to use the clrSteps array for each slice’s color. If there are more slices than colors you’ve provided, don’t worry, Dundas will start at the beginning color in the array and continue through all of the colors as many times as needed.

Be the first to comment - What do you think?  Posted by David Dietrich - May 10, 2009 at 4:28 pm

Categories: .NET, Business Intelligence, Dundas Reports, Windows   Tags: , , ,