When zooming in on a graph with logaritmic scales for the both the left and the bottom axis, lines which do not have any point or only 1 point within the graph "window" are drawn wrong. The example draws three lines, line green and blue should always be on top of each other. but are not after zooming in on the area containing the red line. I am using Visual Studio 2008, C# with TChart 3.5.3425.20245
André
Lines go haywire zooming log-log graph
-
- Newbie
- Posts: 7
- Joined: Fri May 25, 2007 12:00 am
- Location: Delft
- Contact:
Lines go haywire zooming log-log graph
- Attachments
-
- WindowsFormsApplication1.zip
- VisualStudio2008 C# project with example
- (13.18 KiB) Downloaded 324 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Lines go haywire zooming log-log graph
Hi André,
The problem here is that blue and green series have a different number of points and that left and bottom axis have a different range. When zooming or scrolling the chart, since green line only has 2 points a line between them is painted even they are not in the visible chart area. In the meantime, in the blue line a line segment is painted between each pair of points. Axes ranges being different and series having different number of points makes them look different. Hope my explanation is clear. If it isn't don't hesitate to let us know.
The solutions I can think of are those:
1. Use same number of points for both green and blue series.
2. Try using same axis range. For more information on axis manipulation please read tutorial 4.
3. Use isometric axes as in the All Features\Welcome !\Axes\Isometric axes example in the features demo.
Tutorials and features demo are available at TeeChart's program group.
The problem here is that blue and green series have a different number of points and that left and bottom axis have a different range. When zooming or scrolling the chart, since green line only has 2 points a line between them is painted even they are not in the visible chart area. In the meantime, in the blue line a line segment is painted between each pair of points. Axes ranges being different and series having different number of points makes them look different. Hope my explanation is clear. If it isn't don't hesitate to let us know.
The solutions I can think of are those:
1. Use same number of points for both green and blue series.
2. Try using same axis range. For more information on axis manipulation please read tutorial 4.
3. Use isometric axes as in the All Features\Welcome !\Axes\Isometric axes example in the features demo.
Tutorials and features demo are available at TeeChart's program group.
Best Regards,
Narcís Calvet / 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 |
-
- Newbie
- Posts: 7
- Joined: Fri May 25, 2007 12:00 am
- Location: Delft
- Contact:
Re: Lines go haywire zooming log-log graph
Narcis,
As in most applications, the ranges of the axis are determined by the program specification. So there's no way to change that. The green and blue line are both points on the same line, which should be a straight line in a log-log graph. This line should 'touch' the red line in one point. So I started this part of the application by plotting only two points. Should be enough when plotting a straight line (I thought). When zooming in to check if the line did indeed touch the red line I discovered it did not. After checking twice where I did make the mistake in my code, I found out it was not a mistake in my code. Of course I can work around it, by converting all coordinates from the log-log domain, using linear axis en adjusting the labels, but this should not be necessary. It is a simple bug in TeeChart and should be fixed. Anyone who has finished high school can calculate the correct intersections with the axis for a straight line, even in the log-log domain. I'am suprised to be the first user to discover this bug, but maybe the component is used more in the financial domain than in the scientific domain.
André
As in most applications, the ranges of the axis are determined by the program specification. So there's no way to change that. The green and blue line are both points on the same line, which should be a straight line in a log-log graph. This line should 'touch' the red line in one point. So I started this part of the application by plotting only two points. Should be enough when plotting a straight line (I thought). When zooming in to check if the line did indeed touch the red line I discovered it did not. After checking twice where I did make the mistake in my code, I found out it was not a mistake in my code. Of course I can work around it, by converting all coordinates from the log-log domain, using linear axis en adjusting the labels, but this should not be necessary. It is a simple bug in TeeChart and should be fixed. Anyone who has finished high school can calculate the correct intersections with the axis for a straight line, even in the log-log domain. I'am suprised to be the first user to discover this bug, but maybe the component is used more in the financial domain than in the scientific domain.
André
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Lines go haywire zooming log-log graph
Hi André,
Thanks for the information. I've added the issue to the bug list (TF02014568) to be investigated for future releases.
Thanks for the information. I've added the issue to the bug list (TF02014568) to be investigated for future releases.
Best Regards,
Narcís Calvet / 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 |