BarChart: get bar index on touch?
- Dominant language
- Dart
- Stars
- 7.6k
- Forks
- 2k
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 2
Description
fl_chart: ^0.12.2 here.
I need to be able to run a callback on touching a BarChart's bar, and I'm using touchCallback to handle this.
I'd like to get info that would tell me which bar has been touched, like an index, and tried to use barTouchResponse.spot, but it's value is always null.

Is it possible?
Contributor guide
Research direction
Start by tracing BarChart's touchCallback handling and the barTouchResponse.spot value described in the issue. Check how touched bars are represented in the current fl_chart version and determine what information the callback exposes. Done means a touch callback can reliably identify the touched bar, with behavior covered by the relevant existing tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100