Page 1 of 1

Lines go haywire zooming log-log graph

Posted: Wed Nov 18, 2009 2:38 pm
by 13045423
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é

Re: Lines go haywire zooming log-log graph

Posted: Thu Nov 19, 2009 11:26 am
by narcis
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.

Re: Lines go haywire zooming log-log graph

Posted: Fri Nov 20, 2009 8:56 am
by 13045423
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é

Re: Lines go haywire zooming log-log graph

Posted: Fri Nov 20, 2009 4:27 pm
by narcis
Hi André,

Thanks for the information. I've added the issue to the bug list (TF02014568) to be investigated for future releases.