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

Add custom extra dynamic data for FlSpot #1860

Open
kylechandev opened this issue Feb 10, 2025 · 1 comment
Open

Add custom extra dynamic data for FlSpot #1860

kylechandev opened this issue Feb 10, 2025 · 1 comment

Comments

@kylechandev
Copy link

kylechandev commented Feb 10, 2025

Add custom extra dynamic data for FlSpot, then we can easily display the custom information of each data point in LineTouchTooltipData.

For example:
FlSpot(double x, double y, dynamic data);

touchTooltipData: LineTouchTooltipData(
fitInsideHorizontally: true,
fitInsideVertically: true,
getTooltipItems: (List touchedBarSpots) {
return touchedBarSpots.map((touchedSpot) {
dynamic data = touchedSpot.data;
}
}
);

@mluttmann
Copy link

Maybe you can get your specific item with touchedSpot.barIndex and touchedSpot.spotIndex.

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

2 participants