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

Creating a grid behind my line graph

1 Answer 39 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Simon Allport
Top achievements
Rank 2
Simon Allport asked on 18 Feb 2011, 12:43 PM
Hi,
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?

Thanks

Simon

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 23 Feb 2011, 08:36 AM
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">
                        </FillStyle>
                    </Appearance>
                    <Items>

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

Regards,
Yavor
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!
Tags
Chart (Obsolete)
Asked by
Simon Allport
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Share this question
or