代号一 - 条形图中的可点击条形

Codename one - clickable bars in bar chart

我想实现一个具有可点击条形的条形图。为了创建自定义条形图,我创建了一个扩展 BarChart 的 class。 Class BarChart 有一个可能有用的方法:

clickableAreasForPoints(java.util.List<java.lang.Float> points, java.util.List<java.lang.Double> values, float yAxisValue, int seriesIndex, int startIndex)

我想要参数的解释。医生。我有点困惑。

Parameters:
points - the array of points
values - the array of values of each point
yAxisValue - the minimum value of the y axis
seriesIndex - the index of the series to which the points belong
startIndex - the start index of the rendering points

"points" x 值和 "values" y 值? startIndex 到底是什么?

编辑: 我所有的数据都存储在一个 ArrayList 中,其中索引代表 X 值,特定索引处的值是 Y 值。

我认为您不需要覆盖它。抱歉,我们从分叉的 AChartEngine 代码中继承了糟糕的文档,所以我也不熟悉它。

API 供内部使用,它实现了 protected void seriesReleased(SeriesSelection sel) 回调。

我认为您应该能够覆盖它并在单击列时获得回调。