Hide/color the GridLines in the Plotarea of HTMLchart

3 posts, 0 answers
  1. Kiran
    Kiran avatar
    3 posts
    Member since:
    Feb 2013

    Posted 11 Mar 2013 Link to this post


    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. Stamo Gochev
    Admin
    Stamo Gochev avatar
    157 posts

    Posted 14 Mar 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kiran
    Kiran avatar
    3 posts
    Member since:
    Feb 2013

    Posted 19 Mar 2013 Link to this post

    Thanks. That worked.
Back to Top