How to get label for corresponding bar when I swipe the barchart? I have another textview outside of barchart. When I swipe mpandroidchart graph, I need to get x axis label of corresponding position and display in textview. How to do that?
I tried with this.
barChart.setOnChartValueSelectedListener(new OnChartValueSelectedListener() {
@Override
public void onValueSelected(Entry e, int dataSetIndex, Highlight h) {
Log.i("Entry", String.valueOf(e));
}
@Override
public void onNothingSelected() {
}
});
or OnChartGestureListener too, I tried but I don't know how to get the label of the corresponding bar.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…