use of org.xclcharts.event.click.ArcPosition in project XCL-Charts by xcltapestry.
the class ClickPieChart01View method triggerClick.
// 触发监听
private void triggerClick(float x, float y) {
ArcPosition record = chart.getPositionRecord(x, y);
if (null == record)
return;
PieData pData = chartData.get(record.getDataID());
Toast.makeText(this.getContext(), "[此处为View返回的信息] key:" + pData.getKey() + " Label:" + pData.getLabel(), Toast.LENGTH_SHORT).show();
if (null != onClickListener)
onClickListener.onClick(new PointF(x, y), record);
}
Aggregations