imaNNeo / imaNNeo/fl_chart

Continuous tooltip for LineCharts with not enough data

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

Description

**Don't make a duplicate issue.**
I searched but who knows if the query was good enough.... Also the shown examples of line charts do not present the behavior I am looking for.

**Is your feature request related to a problem? Please describe.**
I have a line chart where the x axis is a datetime axis, I have data ranging from 5 days to n years. The granularity of the graph is days. Now for years when I hover over the graph I get a continuous tooltip as there is enough data. But for the 5 days range I have to swipe my finger over the graph to find the place where the tooltip will be shown.

**Describe the solution you'd like**
Since it is a line chart it already has the information on which "y" level to render the line. So it should be fairly simple to expose that value to the tooltip builder.

**Describe alternatives you've considered**
None, but I will manually "generate" the data between the points using linear interpolation for now... but I feel that could be handled by the library,

**Additional context**
image
image

The first image has enough data so the tooltip is always visible (the movement is stuttering but that is not an issue). The second picture has only limited number of data and the tooltip is visible only around the dark bars (which I included for presentation purposes, in reality they would not be there and it would not be clear where the point of interest is).

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the line chart tooltip handling and tooltip builder with sparse datetime data, especially the five-day example described in the issue. Reproduce the behavior, then determine how a continuous tooltip should follow the line between points and verify that it remains usable when data is limited.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.