yunjianwu / achartengine

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

points automatically sorted by x values when plot line chart #247

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. try to plot a point series whose x = sin(t) and y = cos(t) where t = 0.1, 
0.2, 0.3, ... 5.8, 5.9, 6.0, 6.1, 6.2
2. plot LineChart for the points

What is the expected output? What do you see instead?
We should see a circle since t is from 0 to almost 2 * pi. However, 
achartengine 1.0 automatically sort the points by their x values so that we see 
many lines inside the circle which connects the x-adjacent points pair. This 
problem does not come out in achartengine 0.7. This issue seems to be caused by 
the function
  public synchronized SortedMap<Double, Double> getRange(double start, double stop, int beforeAfterPoints)
in XYSeries class. This function return a sorted map for the shown points which 
are sorted by x values.

Please provide a source code snippet that we can use to replicate the issue.

What version of the product binary library are you using?

achartengine 1.0 is affected by this issue. But achartengine 0.7 is not 
affected.

Please provide any additional information below.
This issue seems to be caused by the function
  public synchronized SortedMap<Double, Double> getRange(double start, double stop, int beforeAfterPoints)
in XYSeries class. This function return a sorted map for the shown points which 
are sorted by x values.

Original issue reported on code.google.com by tony.t...@gmail.com on 19 Sep 2012 at 12:44

GoogleCodeExporter commented 9 years ago
Fixed in SVN.

Original comment by dandrome...@gmail.com on 8 Jan 2013 at 3:55

GoogleCodeExporter commented 9 years ago

Original comment by dandrome...@gmail.com on 8 Jan 2013 at 3:55

GoogleCodeExporter commented 9 years ago

Original comment by dandrome...@gmail.com on 8 Jan 2013 at 3:55

GoogleCodeExporter commented 9 years ago
This is still not working tried latest SVN version.
Attaching pictures from both versions 0.7 and 1.1 rc1

Original comment by rok.ostr...@gmail.com on 9 Jan 2013 at 10:34

Attachments:

GoogleCodeExporter commented 9 years ago
Please download 1.1.0-rc2 and if it still doesn't work please add a screenshot 
and code that replicates it.

Original comment by dandrome...@gmail.com on 10 Jan 2013 at 7:41

GoogleCodeExporter commented 9 years ago
Tried rc2 version and latest svn 474. Still the same. Problem is that sortedMap 
is used in XYSeries class as  tony.t...@gmail.com allready pointed out and 
values get sorted before drawn. 
I am attaching new pictures and source code. 

Original comment by rok.ostr...@gmail.com on 13 Jan 2013 at 11:53

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dandrome...@gmail.com on 13 Jan 2013 at 2:22

GoogleCodeExporter commented 9 years ago

Original comment by dandrome...@gmail.com on 24 Jan 2013 at 12:34

GoogleCodeExporter commented 9 years ago
Why has this been marked a "Won't Fix".
I want to plot a circle like "X^2+Y^=r", How would I achieve that ?
Could you help me to make local changes to achartengine to get desired results ?

Original comment by shakmak....@gmail.com on 29 Nov 2013 at 6:46