我想打破dataPoint只获得Y轴的值。 现在,我的代码运行时得到的结果是:
舒张期阅读:[25.0 / 89.0] mmHg
但我希望将其显示为:
舒张期阅读:89.0 mmHg
series_D.setOnDataPointTapListener(new OnDataPointTapListener() {
@Override
public void onTap(Series series, DataPointInterface dataPoint) {
Toast.makeText(Rsults.this, "Diastolic Reading : "+ dataPoint +" mmHg", Toast.LENGTH_SHORT).show();
}
});
答案 0 :(得分:0)
在Selvin的帮助下,代码现在按照我的意愿工作了
series_b.setOnDataPointTapListener(new OnDataPointTapListener() {
@Override
public void onTap(Series series, DataPointInterface dataPoint) {
Double x = dataPoint.getY();
Toast.makeText(Rsults.this, "Systolic Reading : "+ x +" mmHg", Toast.LENGTH_SHORT).show();
}
});