Creating a grid behind my line graph

Thread is closed for posting
2 posts, 0 answers
  1. Simon Allport
    Simon Allport avatar
    32 posts
    Member since:
    Aug 2009

    Posted 18 Feb 2011 Link to this post

    I have a line graph and i want a grid behind it, but i don't know how to get to work, i have got the y axis to show lines going across but not the x axis.

    Also is there any way of fixing what colours the lines are, so for example Company B is always red and Company A is always blue?


  2. Yavor
    Yavor avatar
    11 posts

    Posted 23 Feb 2011 Link to this post

    Hello Simon,

    You can show the gridlines behind the control, for the x and y axis, as shown in the code snippet below:

    RadChart2.PlotArea.XAxis.Appearance.MajorGridLines.Visible = true;
    RadChart2.PlotArea.YAxis.Appearance.MajorGridLines.Visible = true;

    Additionally, for each series, you can set the fill directly, as shown in the code sample below:

    <telerik:ChartSeries Name="Series 1">
                        <Appearance Border-Color="223, 170, 43">
                            <FillStyle MainColor="Red" FillType="Solid">

    This can also be done dynamically.
    I hope this information helps.

    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top