imaNNeo / imaNNeo/fl_chart

PieTouchData not working on some sections

Open
#1,655 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
7.6k
Forks
2k
Avg merge
9d 1h
Merged PRs (30d)
2

Description

Here is my code, in which touch is not detected in some sections, so response is shown. Can anyone help?

PieChart(PieChartData(
sections: pieChartSectionsFirstQuad(readingsResponse),
pieTouchData: PieTouchData(
touchCallback: (FlTouchEvent event, pieTouchResponse) {
setState(() {
if (!event.isInterestedForInteractions ||
pieTouchResponse == null ||
pieTouchResponse.touchedSection == null) {
touchedIndex = -1;
return;
}
});
touchedIndex = pieTouchResponse?.touchedSection!.touchedSectionIndex ?? 0;
},
),
centerSpaceRadius: _width * 0.32,
// sectionsSpace: 0,
startDegreeOffset: -90)

Contributor guide

Open the contributing guide

Research direction

The report only provides a PieChart snippet using PieChartData and PieTouchData, with no repository file or test named. Start by reproducing the supplied callback with sections that include the reported failing areas, then trace which touch events produce no touchedSection. Done means touch detection works consistently across all sections and touchedIndex is updated as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.