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.

How to set the Interior color for the Chart and the Chart Series?

 

For Chartcontrol use its ChartInterior property which specifies the interior of the chart, chart background, chart area background and for Series use its interior property which sets the solid back color, gradient or pattern style with both back and forecolor of a Chart point’s background.

C#

//Specifies Chart Interior

this.chartControl1.ChartInterior = new BrushInfo(GradientStyle.Vertical, Color.AntiqueWhite, Color.LightYellow);

//Chart Background Interior

this.chartControl1.BackInterior = new BrushInfo(GradientStyle.PathEllipse, Color.MistyRose, Color.LightYellow);

 // Chart Area Interior

this.chartControl1.ChartArea.BackInterior = new BrushInfo(GradientStyle.ForwardDiagonal, Color.MistyRose, Color.LightYellow);

//Specifies Series Interior Color

this.chartControl1.Series[0].Style.Interior = new BrushInfo(175, new BrushInfo(GradientStyle.BackwardDiagonal, new BrushInfoColorArrayList(new Color[] { Color.SaddleBrown, Color.Salmon })));

VB

'Specifies Chart Interior

Me.chartControl1.ChartInterior = New BrushInfo(GradientStyle.Vertical, Color.AntiqueWhite, Color.LightYellow)

'Chart Background Interior

Me.chartControl1.BackInterior = New BrushInfo(GradientStyle.PathEllipse, Color.MistyRose, Color.LightYellow)

' Chart Area Interior

Me.chartControl1.ChartArea.BackInterior = New BrushInfo(GradientStyle.ForwardDiagonal, Color.MistyRose, Color.LightYellow)

'Specifies Series Interior Color

Me.chartControl1.Series(0).Style.Interior = New BrushInfo(175, New BrushInfo(GradientStyle.BackwardDiagonal, New BrushInfoColorArrayList(New Color() { Color.SaddleBrown, Color.Salmon })))

Article ID: Published Date: Last Revised Date: Platform: Control:
42 04/30/2011 07/10/2014 Windows Forms Chart
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.