fl_chart icon indicating copy to clipboard operation
fl_chart copied to clipboard

LineChart with multiple lines: Get single point on hovering/tapping a line

Open pamtbaau opened this issue 2 years ago • 1 comments

I've read the docs, searched the web and issues here but haven't found a solution yet...

When hovering lines in a LineChart with multiple lines, I always get a tooltip with values for each line at a certain Y value. What I want is to show a tooltip for only the line the mouse is hovering over or being tapped.

In a stacked BarChart however, in onTouchCallback the BarTouchResponse contains a single BarTouchedSpot with a touchedBarGroupIndex and touchedStackItemIndex. I can then use these indexes to show only a single value in the tooltip.

Describe the solution you'd like I would line the LineTouchResponse:

  • To have a single TouchLineBarSpot with properties like the touchedLineGroupIndex/touchedStackItemIndex.
  • Or adding properties touchedLineGroupIndex/touchedStackItemIndex to the LineTouchResponse itself.

pamtbaau avatar Nov 27 '23 16:11 pamtbaau

Facing same issue. Showing Both data combinedly on same tooltip and tooltip position also same

MonirDev avatar Feb 13 '24 14:02 MonirDev

Curious if any progress can be shared... Is feature considered, or 'won't implement'?

pamtbaau avatar Feb 24 '24 09:02 pamtbaau

Does this answer help?

imaNNeo avatar Feb 28 '24 23:02 imaNNeo

@imaNNeo, Thanks for your follow-up.

I'm sorry to say that I got curious to alternatives in the meantime and I've just finished migrating the other day. Which by the way doesn't mean FL_Charts isn't a great product... It is!

pamtbaau avatar Feb 29 '24 06:02 pamtbaau

@imaNNeo, Thanks for your follow-up.

I'm sorry to say that I got curious to alternatives in the meantime and I've just finished migrating the other day. Which by the way doesn't mean FL_Charts isn't a great product... It is!

No worries, Thanks for letting me know. I will do my best to make this library better every day.

imaNNeo avatar Mar 28 '24 21:03 imaNNeo