Setting Color of Series

I have a chart with 3 series and want to change the color that each of the series is displayed as. I looked into the palletes, but none of them were an exact match. Additionaly I found out how to change their border color using: Me.LaborChart.Series(0).Style.Border.Color = Color.Blue Me.LaborChart.Series(1).Style.Border.Color = Color.Red Me.LaborChart.Series(2).Style.Border.Color = Color.Yellow but have not figured out how to change the inside color. Thanks for any help!

2 Replies

AD Administrator Syncfusion Team March 23, 2005 05:29 PM UTC

Off topic, but there is one other question I have. When I load my chart, all of my data is from 0-100, but the chart always shows -25,0,25,50,75,100 I dont mind the 25 increments, but how can I get rid of the one increment below 0?


DJ Davis Jebaraj Syncfusion Team March 24, 2005 07:41 PM UTC

Hi, You can change the Color assigned to each chart series by changing the Interior property of the ChartSeries'' style. BrushInfo interior = this.chartControl1.Series[0].Style.Interior; if(interior == null) interior = new BrushInfo(); Color foreColor = interior.ForeColor; this.chartControl1.Series[0].Style.Interior = new BrushInfo(GradientStyle.None,foreColor, this.borderColorControl.SelectedColor); this.chartControl1.Refresh(); Please also refer to this sample project linked to below: ChartSeriesColors_CS_7277.zip Regarding the range padding, you can manually set the Min of the X axis range to be 0. this.chartControl1.PrimaryXAxis.Range.Min = 0; Thanks and regards, Davis

Loader.
Up arrow icon