Hi
I have an RSI line chart and the grid value range is from 0 - 100. I need only two grid lines with values 20 and 80. Currently the grid lines are generated automatically but not at 20 and 80.
Thanks
Larry
How to draw grid lines with given values
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: How to draw grid lines with given values
Hello Larry,
probably the easiest way to achieve what you want is to use 'custom labels,' e.g.
Which here gives me this chart:
probably the easiest way to achieve what you want is to use 'custom labels,' e.g.
Code: Select all
private void InitializeChart(TChart chart)
{
Random rnd = new();
Line line = new(chart.Chart);
for (int i = 0; i < 20; i++)
{
line.Add(rnd.Next(0, 100));
}
chart.Axes.Left.Grid.DrawEvery = 1;
chart.Axes.Left.Labels.Items.Add(20, "20");
chart.Axes.Left.Labels.Items.Add(80, "80");
}
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |