Custom gridlines on chart

4 posts, 0 answers
  1. Oner
    Oner avatar
    1 posts
    Member since:
    Jul 2010

    Posted 14 Oct 2010 Link to this post

    Hello every one, I have a problem with axis gridlines. In my project I need to draw custom gridlines on the chart. On the chart I have to draw those gridlines that I calculated. I tried ArrayList, List, Array for each lines but I could not succeeded. Each line calculated simultaneusly.
  2. Yavor
    Admin
    Yavor avatar
    401 posts

    Posted 20 Oct 2010 Link to this post

    Hello Oner,

    Currently the RadChart for WinForms doesn't support custom grid lines. This feature is available in our WPF and Silverlight RadChart. You can see it in action in our demo here.
    I hope this information helps.

    Regards,
    Yavor Ivanov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Dan
    Dan avatar
    70 posts
    Member since:
    Mar 2007

    Posted 11 Oct 2011 Link to this post

    Hi Yavor

    I need your help on this matter:
    For current WPF project I must create a report with an embedded Chart which must display horizontal gridlines (corresponding to Y axis) for certain values (not major or minor gridlines!). Please see attached file.

    Short explanations: on X axis: time, on Y axis: weight (kg)

    After one working day I couldn't find any solution.
    Any help will be appreciated (an example would be great).

    Thanks a lot!!
    Dan
  5. Yavor
    Admin
    Yavor avatar
    401 posts

    Posted 12 Oct 2011 Link to this post

    Hi Dan,

    You can use RadChart custom GridLine functionality which allows you to display grid lines (both horizontal and vertical) on any value you want. Here is a small example:

    <telerik:RadChart Name="radChart">
        <telerik:RadChart.DefaultView>
            <telerik:ChartDefaultView>
                <telerik:ChartDefaultView.ChartArea>
                    <telerik:ChartArea>
                        <telerik:ChartArea.Annotations>
                            <telerik:CustomGridLine YIntercept="150"
                                         Stroke="Red"
                                         StrokeThickness="2" />
                        </telerik:ChartArea.Annotations>
                    </telerik:ChartArea>
                </telerik:ChartDefaultView.ChartArea>
            </telerik:ChartDefaultView>
        </telerik:RadChart.DefaultView>
        ...
    </telerik:RadChart>
    You can find more information on custom GridLines in our online help system here.

    If you have any other questions about RadChart for WPF please ask them in the proper category. This way other people that have similar problems can help you too.

    All the best,
    Yavor
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Back to Top