We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Setting Color of Series

Thread ID:

Created:

Updated:

Platform:

Replies:

26491 Mar 23,2005 12:16 PM Mar 24,2005 02:41 PM Windows Forms 2
loading
Tags: Chart
Administrator [Syncfusion]
Asked On March 23, 2005 12:16 PM

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!

Administrator [Syncfusion]
Replied On March 23, 2005 12:29 PM

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?

Davis Jebaraj [Syncfusion]
Replied On March 24, 2005 02:41 PM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;