zcorsair / achartengine

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

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

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
hey hou

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

GoogleCodeExporter commented 9 years ago
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