Hi guys,
short question:
How can i fix the point of origin in the middle of the cartesian coordinate-system? I am using the Fastline type to display a relative function, but the axis are not fixed at their zero points, so the view is very bad.
Regards
Alexander
How to fix the pint of origin in the middle of the c-system?
Re: How to fix the pint of origin in the middle of the c-system?
Hello asimon,
I suggest you use method SetMinMax to modify the scale of axes as I do in next code:
Could you please, tell us if previous code works as you want?
I hope will helps.
Thanks,
I suggest you use method SetMinMax to modify the scale of axes as I do in next code:
Code: Select all
private Steema.TeeChart.Styles.FastLine fastLine1;
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
fastLine1 = new FastLine(tChart1.Chart);
Random rnd = new Random();
for (int i = 0; i < 10; i++)
{
if(i==0)
{
fastLine1.Add(0,0);
}
else
{
fastLine1.Add(i, rnd.Next(10));
}
}
tChart1.Axes.Left.SetMinMax(-(fastLine1.YValues.Maximum),fastLine1.YValues.Maximum);
}
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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 |