imaNNeo / imaNNeo/fl_chart

"FlSpot.nullSpot' at the end of the LineChartBarData not working

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

Description

hello man nice work you doing here i found this bug with using 'FlSpot.nullSpot' at the end of the chart, it the chart just ignores it like it does'nt exist but if u put a regular flSSpot after it it works fine, here is the code to produce the bug `
[
const FlSpot(0, 0),
const FlSpot(1, 0),
const FlSpot(2, 2),
const FlSpot(3, 3),
FlSpot.nullSpot,
FlSpot.nullSpot,
FlSpot.nullSpot,
],`using this code produces this
![Screenshot 2024-12-26 232532](https://github.com/user-attachments/assets/be87d1c9-fd44-44ad-a91c-ca0d0fe93d37)
and this code with adding a regular flspot after the null ones "the desired output" `
[
const FlSpot(0, 0),
const FlSpot(1, 0),
const FlSpot(2, 2),
const FlSpot(3, 3),
FlSpot.nullSpot,
FlSpot.nullSpot,
const FlSpot(6, 5),
];`
![Screenshot 2024-12-26 232446](https://github.com/user-attachments/assets/e8f615aa-a50e-48be-ba55-dcf548b92f58)
thanks in advance ;)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the provided FlSpot.nullSpot lists in a LineChartBarData and compare the two rendered outputs. Trace the LineChart and FlSpot.nullSpot handling to find why trailing null spots are ignored. Done means consecutive null spots at the end produce the same intended chart gap as when followed by a regular FlSpot.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.