Skip to content

Can I "highlight" a second (and third and fourth...) graph by hovering/touching a first graph? #1630

Closed Answered by av4625
av4625 asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to get the interactivity that I wanted.

Incase anyone else is interested.
I was able to use the touchCallback in LineTouchTooltipData.
ev.isInterestedForInteractions is true if you are hovering on the chart.
res?.lineBarSpots then shows the spots being hovered.

You can then save this information in some type of app state and draw the spots on the other charts using checkToShowDot of dotData of LineChartBarData.

Excuse the look of the app in the video, it is very much a POC to see if flutter and fl_chart will work for me. Now just to work out if I can show the tool tip and spike line on the chart I'm not hovering on!

Screen.Recording.2024-04-14.at.21.28.51.mov

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by av4625
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant