imaNNeo / imaNNeo/fl_chart

Add custom extra dynamic data for FlSpot

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

Description

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;
}
}
);

Contributor guide

Open the contributing guide

Research direction

Start by locating FlSpot and LineTouchTooltipData, then trace how a spot becomes a LineBarSpot for tooltip callbacks. Add support for carrying custom per-point data through that path and verify that getTooltipItems can access it as shown in the issue example.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.