I use achartengine to draw a line chart. I use this code to get current point sellected `view.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // handle the click event on the chart
quickAction.show(v);
SeriesSelection seriesSelection = view.getCurrentSeriesAndPoint();
if (seriesSelection != null) {
if(mToast == null){
Toast.makeText( mContext , "" , Toast.LENGTH_SHORT );
}
mToast.setText( "" + seriesSelection.getValue() + "mg/dL");
mToast.setGravity(Gravity.TOP|Gravity.CENTER_HORIZONTAL, 0, 0);
mToast.show();
} else {
Log.i(this.toString(), "OnClickListener" + v.getX() + "y:" + v.getY());
}
}
});`
Now i want to get position of this point or position of touch to display a bubble to show detail point, any idea for help for examp
Have you tried this?
or much better look at this example rows: 167-172
EDIT
Ok, try this, for each point in your dataset:
What I don't like here is that, in the worst case, you've to iterate all the points...but i hope that this will give you some hints.
Here's my code to get the position of the plot that is clicked on the line chart. It's working for me. I am displaying text on the location where the point is clicked.
Thank Lus, i also solved my problem:
});