in the left-top ,i put a textView ,my purpose is :8ball: when i touch the bar,i can monitoring it's value,and show this value in the mentioned above.thx!On the other hand,this value is dynamic,when i touch the distinct bar,the textview's value will be changed...
https://github.com/PhilJay/MPAndroidChart/wiki/Interaction-with-the-Chart
@Override
public void onValueSelected(Entry e, int dataSetIndex, Highlight h) {
myTextView.setText("" + e.getVal());
}
Unfortunately,i have do this in my code,but this method seems not work...also,
@Override
public void onValueSelected(Entry e, int dataSetIndex, Highlight h) {
float val = e.getVal();
Log.v("1...................","bar was touched:"+Float.toString(val));
}
why i cannot see any log in my studio?
Without any further information, I have no idea, I can only guess.
Have you set the listener?
chart.setOnChartValueSelectedListener(this)
Oh my god...,how can i be so stupid....thx very much!!!
Most helpful comment
Without any further information, I have no idea, I can only guess.
Have you set the listener?
chart.setOnChartValueSelectedListener(this)