imaNNeo / imaNNeo/fl_chart

Combine several bar data in linechart into one single tooltip

Open
#1,762 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

A linechart with several bar charts is used to compare different values, so there should be a way to unify all those values into one single tooltip.

Consider the following example.

I have two data series over the same period of time. When you hover your mouse you should be able to show one single tooltip with the date (the date is the same for both) and the value of each bar chart.

This is a screenshot of the original library I am using in Javascript:
![2024-10-25 12 57 19](https://github.com/user-attachments/assets/4b719cbb-a4f3-43b4-9cbb-4d26ccb584ab)

But I cannot find a way to do the same here and I get 2 different tooltips with the date field duplicated:
![2024-10-25 13 00 35](https://github.com/user-attachments/assets/b5ed921f-8032-4097-88de-b0da814a8fa2)

Another issue since both tooltips are independent is that the one with higher value is placed on top and the other at the bottom, so when you hover the mouse along the chart, this is misleading because sometimes one of the values is placed on top and others at the bottom:
![2024-10-25 13 08 44](https://github.com/user-attachments/assets/fabbc46a-585a-4ceb-8e89-20a12a48f454)

Contributor guide

Open the contributing guide

Research direction

Start by locating the line chart tooltip handling and how bar-series hover values are collected. Reproduce the issue with two bar data series sharing dates, then determine how one tooltip can show the shared date and both values. Done means the chart displays one consistently positioned tooltip instead of duplicated independent tooltips.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.