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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: WinForms |
Control: Chart |
Published Date: April 30, 2011 |
Last Revised Date: June 25, 2019

 

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 })))

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon 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.Close Icon