views:

44

answers:

1

Is there a way to create my own charting palette in which I can specify my own colors?

The ones that are available from

  chart.Palette = System.Web.UI.DataVisualization.Charting.ChartColorPalette. //palette

do not really fit in with our design, so creating my own would be nice if this is possible thanks!

+1  A: 

You can define your own palette using chart's PaletteCustomColors collection.

chart.PaletteCustomColors.Add(Color.Red);
chart.PaletteCustomColors.Add(Color.Blue);

Also if you need to control a color of each datapoint use the datapoint's color:

chart.Series[0].Points[0].Color = Color.Red;

Note: Bind chart to data before setting the datapoint colors.

Dusty Roberts
Great, thank you!
twal