Hi,
I need a graph that will always show the last 15 minutes of the data. In order to achieve it on every insert i update the Minimum and the Maximum
This is the code:
DateTime endTime = DateTime.UtcNow;
DateTime startTime = endTime.Subtract(new TimeSpan(0, 15, 0));
tchart.Axes.Bottom.Minimum = endTime.ToOADate();
tchart.Axes.Bottom.Maximum = startTime.ToOADate();
Can i do it automatically ?
Also, i need the offset (tchart.Axes.Left.MaximumOffset = 50; tchart.Axes.Left.MinimumOffset = 50;) to be only on the values of the last 15 minutes.
If i set it at the beginning it won't be accurate because the minimum and the maximum of the last 15 minutes always changing.
How can i achieve it?
Thanks,
Ofer
Automatic bottom axes
Re: Automatic bottom axes
Hi Ofer,
If you still have problems with it, please try to arrange a simple example project we can run as-is to reproduce the issue here.
To do it automatically you should call this bottom axis rescale routine after adding your points.oferyo wrote:Can i do it automatically ?
Here is another thread with an example of how you should rescale your left axis: http://www.teechart.net/support/viewtop ... f=4&t=9022oferyo wrote:Also, i need the offset (tchart.Axes.Left.MaximumOffset = 50; tchart.Axes.Left.MinimumOffset = 50;) to be only on the values of the last 15 minutes.
If i set it at the beginning it won't be accurate because the minimum and the maximum of the last 15 minutes always changing.
If you still have problems with it, please try to arrange a simple example project we can run as-is to reproduce the issue here.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |