gorteganesh / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

line chart with multiple Y scales and axis does not align correctly after zoom or pan #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the achartengine demo
2. Select "Temperature and Sunshine"
3. Pan around the graph.

What is the expected output? What do you see instead?
Expected: The graph should look the same - just different areas should be 
viewed.

Actual: If you pan around, you can get the blue and yellow lines to move 
relative to each other horizontally and vertically (they should stay fixed 
relative to each other). For example, you can get the blue line to go above the 
yellow line at x=6.

Please provide a source code snippet that we can use to replicate the issue.
I reproduce the issue using r314.

What version of the product binary library are you using?
Compiled r314.

Original issue reported on code.google.com by candrews...@gmail.com on 3 Oct 2011 at 7:53

GoogleCodeExporter commented 9 years ago
If you don't use the setPanLimits and setZoomLimits functions (comment out 
lines 86 and 87 in MultipleTemperatureChart.java) then the problem no longer 
occurs. So the bug is probably somewhere in Pan.java and Zoom.java and the way 
they handle limits for graphs with multiple series.

Original comment by candrews...@gmail.com on 3 Oct 2011 at 8:17

GoogleCodeExporter commented 9 years ago

Original comment by dandrome...@gmail.com on 26 Oct 2011 at 5:30

GoogleCodeExporter commented 9 years ago
Hi,
I have resolved this bug in setPanLimits() and setZoomLimits() functions so 
that the graphs don't move relative to each other. As soon as zoom/pan limits 
are reached for one graph, zoom/pan is disabled for the other one so that they 
remain fixed relative to each other.
I have attached the git diff. Please review the changes. 

Original comment by vikramra...@gmail.com on 29 Dec 2011 at 7:09

Attachments:

GoogleCodeExporter commented 9 years ago
Included the patch in SVN rev. r321.
It seems to work for the Y axis, but still seem to have the issue on the X axis.

Original comment by dandrome...@gmail.com on 3 Jan 2012 at 1:40

GoogleCodeExporter commented 9 years ago
The issue is resolved for both the axis now. Please review the patch.

Original comment by vikramra...@gmail.com on 4 Jan 2012 at 11:17

Attachments:

GoogleCodeExporter commented 9 years ago
Please update to revision r321 and do the diff again.

Original comment by dandrome...@gmail.com on 4 Jan 2012 at 7:41

GoogleCodeExporter commented 9 years ago

Original comment by dandrome...@gmail.com on 4 Jan 2012 at 7:41

GoogleCodeExporter commented 9 years ago
Also, note that these patches are completely wrong for the case that pan or 
zoom limits are not specified.
I will do the fixes and please update your patch after that.

Original comment by dandrome...@gmail.com on 4 Jan 2012 at 7:57

GoogleCodeExporter commented 9 years ago
The Pan.java in r322 is not working and the graphs still move relative to each 
other. I have done a diff against r321 and tested this for both cases whether 
limits are set or not. Please include this patch.

Original comment by vikramra...@gmail.com on 6 Jan 2012 at 11:07

Attachments:

GoogleCodeExporter commented 9 years ago
Try the version that you have without setting pan limits. You will get 
exceptions and it will not work at all.
I fixed this, so please checkout the current version of the code (r350) and do 
your changes that fix the issue on the head revision. Then, publish the patch. 
Make sure you add some documentation, such as other can understand what you are 
doing.

Original comment by dandrome...@gmail.com on 6 Jan 2012 at 1:20

GoogleCodeExporter commented 9 years ago
Fixed in SVN rev. r362.

Original comment by dandrome...@gmail.com on 12 Jan 2012 at 1:36

GoogleCodeExporter commented 9 years ago
stackoverflow.com/questions/16344118/achartengine-two-lines-with-2-y-axis-and-1-
x-axis-second-line-dont-fit The problem is that you are setting an X axis 
range only for the first scale. So, you either remove the setXAxis* calls or 
you add similar ones for the second scale you have。

Original comment by Canfeng....@gmail.com on 28 May 2013 at 3:23