Hi Sandra,
Using your code, which only uses e.LabelText, the memory does not increase in my test application.
However, I will need to try it out in our actual application which is more complex as it has both time and non-time series mixed in a single Chart. I'm not sure whether e.LabelText is sufficient.
I will revert if I have further problem.
Thanks for the help.
Memory Usage keep increasing when auto scrolling chart
Re: Memory Usage keep increasing when auto scrolling chart
Hello jdsu,
Thanks for your information. If you have any problems please let me know .
Thanks,
Thanks for your information. If you have any problems please let me know .
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 |
Re: Memory Usage keep increasing when auto scrolling chart
Hi Sandra,
With just the e.LabelText, it is very difficult to work with.
I have problem with the Labels shown in front of the 1st Data Point.
The first scenario is showing the Time Span. You can see that the Labels shows Negative Time Span.
This is not wanted. I only want the label to show from "00:00:00.0" on the first Data Point on wards.
The second scenario is showing the Physical Time. You can see that the Labels shows time before the 1st Data Point.
This is not wanted. I only want the label to show starting from the first Data Point.
How can I change the code to solve the above issues?
With just the e.LabelText, it is very difficult to work with.
I have problem with the Labels shown in front of the 1st Data Point.
The first scenario is showing the Time Span. You can see that the Labels shows Negative Time Span.
This is not wanted. I only want the label to show from "00:00:00.0" on the first Data Point on wards.
The second scenario is showing the Physical Time. You can see that the Labels shows time before the 1st Data Point.
This is not wanted. I only want the label to show starting from the first Data Point.
How can I change the code to solve the above issues?
- Attachments
-
- time-before-first-point.png (10.87 KiB) Viewed 5894 times
-
- negative.png (12.23 KiB) Viewed 5920 times
Re: Memory Usage keep increasing when auto scrolling chart
Hello jdsu,
Can you please try to do something as next code in your application and check if it works as you expect?
If you have any problems, please let me know.
Thanks,
Can you please try to do something as next code in your application and check if it works as you expect?
Code: Select all
if (sender == tChart1.Axes.Bottom)
{
DateTime firstValue = DateTime.FromOADate(tChart1[0].XValues.First);
DateTime itemValue = DateTime.Parse(e.LabelText);
if (firstValue > itemValue)
{
e.LabelText = firstValue.Subtract(itemValue).ToString();
}
else
{
e.LabelText = itemValue.Subtract(firstValue).ToString();
}
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 |
Re: Memory Usage keep increasing when auto scrolling chart
Hi Sandra,
Referring to the chart in my previous email, notice that my first data point on the chart is not align with the grid lines.
How can I make the grid lines starts from my first data point?
Referring to the chart in my previous email, notice that my first data point on the chart is not align with the grid lines.
How can I make the grid lines starts from my first data point?
Re: Memory Usage keep increasing when auto scrolling chart
Hello JDSU,
I consider that in my suggestion project, first data point is aligned in the grid line, as you can see in my attached image: As you see in the black rectangles I have drawn around of the grid line and first value of data, the align of point with grid, is correct for me. If you doesn't agree with me and consider that alienation should be the other, please, you can explain as you expect the first value is aligned
Thanks,
I consider that in my suggestion project, first data point is aligned in the grid line, as you can see in my attached image: As you see in the black rectangles I have drawn around of the grid line and first value of data, the align of point with grid, is correct for me. If you doesn't agree with me and consider that alienation should be the other, please, you can explain as you expect the first value is aligned
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 |