Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PieTouchData not working on some sections #1655

Open
chatali96 opened this issue May 8, 2024 · 0 comments
Open

PieTouchData not working on some sections #1655

chatali96 opened this issue May 8, 2024 · 0 comments

Comments

@chatali96
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant