Missing events in touchCallback for pan and zoom
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 7.6k
- Forks
- 2k
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
As soon as a LineChart has a set transformationConfig property no FlPan* events are being reported anymore to touchCallback in lineTouchData.
**To Reproduce**
Modify LineChartSample12 so that lineTouchData includes a touchCallback:
```
lineTouchData: LineTouchData(
touchCallback:
(FlTouchEvent event, LineTouchResponse? touchResponse) {
debugPrint(event.runtimeType.toString());
},
...
```
Try to zoom and pan. This callback will not report FlPanStartEvent and subsequent events.
Is this intentional?
I need these events to figure out when the user has reached the starting point of the diagram to lazy load more data.
**Versions**
Flutter: 3.32.1
fl_chart: 1.0.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with LineChartSample12 and its LineTouchData touchCallback reproduction. Trace how transformationConfig handles pan and zoom events, then compare the reported events with the expected FlPanStartEvent and subsequent events. Done means the callback reports the relevant pan events while zooming and panning, with behavior covered by an appropriate test if the project provides one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- frontend, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100