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

chartView.toRealPoint() not working for static chart #479

Open
GoogleCodeExporter opened this issue Jun 1, 2015 · 2 comments
Open

chartView.toRealPoint() not working for static chart #479

GoogleCodeExporter opened this issue Jun 1, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. setting no zoom and no pan (static graph)
2. setting onTouchListener
3. trying to get real point - chartView.toRealPoint()


What is the expected output? What do you see instead?
number on x-axis /// infinity or -infinity

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

  mRenderer.setZoomEnabled(false, false);
  mRenderer.setPanEnabled(false);

 chartView.setOnTouchListener(new View.OnTouchListener() {
                @Override
                public boolean onTouch(View v, MotionEvent event) {
                    final int action = event.getAction();
                    switch (action) {
                        case MotionEvent.ACTION_DOWN :
                           double x = chartView.toRealPoint(0)[0]; 
                    }  
                    return false;
                }
 }

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

Please provide any additional information below.
Any other way to get x-axis value on chart? some trick off?


Original issue reported on code.google.com by jabadub...@gmail.com on 5 May 2015 at 10:11

@GoogleCodeExporter
Copy link
Author

hey hou

Original comment by jabadub...@gmail.com on 6 May 2015 at 8:44

@GoogleCodeExporter
Copy link
Author

ok, enough was setting same values for mRenderer.setXAxisMax() and ..Min() then 
it i guess repaint somehow and save values to chartview so I can access those 
values with chartView.toRealPoint(0)[0]

Original comment by jabadub...@gmail.com on 6 May 2015 at 9:06

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