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 disable grid lines?

Thread ID:

Created:

Updated:

Platform:

Replies:

71353 Jan 28,2008 10:22 AM Jul 18,2011 11:27 AM WPF 3
loading
Tags: Chart
Mike Eshva
Asked On January 28, 2008 10:22 AM

How to disable grid lines but still have labels? I tried with ChartAxis.LineStroke setting Pen.Brash to Transparent but with no success. I also tried to set Pen.Thikness to 0 with no luck.


Administrator [Syncfusion]
Replied On January 29, 2008 12:57 AM

Hi Mike,

You can use the dependency property of ChartArea in the ChartAxis markup extension to disable the GridLines. The following code shows how to set GridLines property to false.

[XAML]


...
...




[C#]


ChartArea.SetShowGridLines(myChart.Areas[0].PrimaryAxis,false);


Similary you can set GridLines to false for Secondary axis also.

Let me know if you have any queries

Thanks for your interest in Syncfusion products.

Regards,
Asem.



Matt Machalinski
Replied On July 13, 2011 02:31 PM

How do you change the color of these lines? I changed the tick color, but that only changes the actual tick color that is outside of the grid area.


Muralidharan P [Syncfusion]
Replied On July 18, 2011 11:27 AM

Hi Asem,

Thanks for using Syncfusion products.

We can change the gridlines color by using the dependency property GridLineStroke of ChartArea in the ChartAxis. The following code shows how to change the color of GridLines.

[XAML]









Similary you can set GridLines color for Secondary axis also. Based on your requirement we have created a simple sample and the same can be downloaded from the following location.

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=WPF-1485564506.zip

Let me know if you have any queries

Regards ,
Muralidharan.




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.

;