This is a migrated thread and some comments may be shown as answers.

Hide/color the GridLines in the Plotarea of HTMLchart

2 Answers 1360 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Kiran
Top achievements
Rank 1
Kiran asked on 11 Mar 2013, 09:54 PM

Hi,

I am using the RadHtmlChart , with 4 Area Series, and have 300 labels on the X-axis.

I want to hide or change the color of the Gridlines in the Plotarea background, I need to display only the Area Series without any background lines.

Is there a way to do it on either the client tags or server code ?

Thanks
Kiran

2 Answers, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 14 Mar 2013, 10:34 AM
Hi Kiran,

You could change the color of the GridLines of the RadHtmlChart by using the MajorGridLines and MinorGridLines properties in the markup for both the XAxis and the YAxis in the PlotArea. If you want to set the color of the GridLines of the XAxis to Red and the GridLines of the YAxis to Blue, you could use the following:

<XAxis>
    <MajorGridLines Color="Red" />
    <MinorGridLines Color="Red" />
</XAxis>
 
<YAxis>
    <MajorGridLines Color="Blue" />
    <MinorGridLines Color="Blue" />
</YAxis>

A good example for coloring the GridLines can be found in our Area Chart's documentation.

In case you want to hide the GridLines, you can set their Visible property to false, e.g.
<XAxis>
    <MajorGridLines Visible="false" />
    <MinorGridLines Visible="false"/>
</XAxis>
 
<YAxis>
    <MajorGridLines Visible="false" />
    <MinorGridLines Visible="false" />
</YAxis>


All the best,
Stamo Gochev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Kiran
Top achievements
Rank 1
answered on 20 Mar 2013, 02:32 AM
Thanks. That worked.
Tags
Chart (HTML5)
Asked by
Kiran
Top achievements
Rank 1
Answers by
Stamo Gochev
Telerik team
Kiran
Top achievements
Rank 1
Share this question
or