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 real开发者_C百科ly fit in with our design, so creating my own would be nice if this is possible thanks!
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.
精彩评论