BarTouchedSpot constructor
BarTouchedSpot(
- BarChartGroupData touchedBarGroup,
- int touchedBarGroupIndex,
- BarChartRodData touchedRodData,
- int touchedRodDataIndex,
- BarChartRodStackItem? touchedStackItem,
- int touchedStackItemIndex,
- FlSpot spot,
- Offset offset,
When touch happens, a BarTouchedSpot returns as a output,
it tells you where the touch happened.
touchedBarGroup
, and touchedBarGroupIndex
tell you in which group touch happened,
touchedRodData
, and touchedRodDataIndex
tell you in which rod touch happened,
touchedStackItem
, and touchedStackItemIndex
tell you in which rod stack touch happened
(touchedStackItemIndex
means nothing found).
You can also have the touched x and y in the chart as a FlSpot using spot
value,
and you can have the local touch coordinates on the screen as a Offset using offset
value.
Implementation
BarTouchedSpot(
this.touchedBarGroup,
this.touchedBarGroupIndex,
this.touchedRodData,
this.touchedRodDataIndex,
this.touchedStackItem,
this.touchedStackItemIndex,
FlSpot spot,
Offset offset,
) : super(spot, offset);