Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate x values behavior in XYSeries #477

Open
GoogleCodeExporter opened this issue Aug 26, 2015 · 0 comments
Open

duplicate x values behavior in XYSeries #477

GoogleCodeExporter opened this issue Aug 26, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create an XYSeries (called series)
2. add a point (1.0, 1.0)
3. add a point (1.0, 2.0)
4. print series.getX(series.getItemCount() - 1) 
series.getY(series.getItemCount() - 1)

What is the expected output? What do you see instead?
The expected output is (1.0, 2.0). Instead, I see (1.0000000002, 2.0). 



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

XYSeries series = new XYSeries("series");

series.add(1, 1);
series.add(1, 2);

int index = series.getItemCount() - 1;

System.out.println(series.getX(index) + " , " + series.getY(index));

What version of the product binary library are you using?
1.2.0

Please provide any additional information below.
If I attempt to add two points with the same value for x to an XYSeries, the 
second x value is adjusted so that it is slightly greater than the intended 
value.

ex: if I add (1.0, y1) and (1.0, y2) the XYSeries stores the second point as 
(1.00000002, y2)

I am not sure if this behavior is intentional, because obviously a function 
can't map the same domain value to two separate range values. However, I am 
using your chart engine for graphing discrete sets of data, so I would like to 
be able to create 2 or more points with the same x value.


Original issue reported on code.google.com by sweidenk...@gmail.com on 10 Apr 2015 at 5:51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant