Skip to content

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

@GoogleCodeExporter

Description

@GoogleCodeExporter
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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions