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

Chart Interior Border

Thread ID:





75745 Aug 7,2008 03:27 PM UTC Aug 8,2008 07:44 PM UTC WinForms 2
Tags: Chart
Robert Avery
Asked On August 7, 2008 03:27 PM UTC

I would like to eliminate all gridlines within the Chart Interior so that you only see the series. However, when I do that, how do I change the color of the border separating the ChartControl.ChartInterior
from the


Manohari [Syncfusion]
Replied On August 8, 2008 04:46 AM UTC

Hi Robert,

Thanks for your interest in Syncfusion products.

It is possible to differentiate the ChartInterior border with different color using the ChartArea.RenderBounds rectangle.Please find the sample code below.

Sample code:

this.chartControl1.PrimaryXAxis.DrawGrid = false;
this.chartControl1.PrimaryYAxis.DrawGrid = false;
this.chartControl1.ChartAreaPaint += new PaintEventHandler(chartControl1_ChartAreaPaint);

void chartControl1_ChartAreaPaint(object sender, PaintEventArgs e)
Rectangle chartInteriorBorder = this.chartControl1.ChartArea.RenderBounds;
Rectangle chartAreaBorder = this.chartControl1.ChartArea.Bounds;
using (Pen p = new Pen(Color.SteelBlue))
e.Graphics.DrawRectangle(p, chartInteriorBorder);
p.Color = Color.Maroon;
e.Graphics.DrawRectangle(p, chartAreaBorder);


Also I have attached the sample that illustrates the same in this link below.


Kindly let us know if this meets your requirements. Thanks for your patience.


Robert Avery
Replied On August 8, 2008 07:44 PM UTC

This is great. Thanks.


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.

Please sign in to access our forum

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

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