-
I'd like to make a page that has a few charts like this. they have a common X axis and different Y axis. The number 2 question from here is answered and suggests I can do this which is great: #1471 My question is, when I hover over one of these charts can I show the spike line and tool tip and point that lines up with the same X position from the hover on the others as well? I also plan to have a track map like bottom left, it will just chart the coordinates as a line chart, id also like if when I hover on one of the charts I could show a point on the track map chart that correlates. I am pretty comfortable about how to store and access the data. I'm just not sure how to show the spike line and/or tooltip and/or point on a chart at a specific point that is currently not being hovered on. I have checked here but this just seems to show how to modify the tooltip etc of the chart you are hovering on, not others. It is possible I have missed something as I am new to flutter/dart. Hope that makes sense! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to get the interactivity that I wanted. Incase anyone else is interested. You can then save this information in some type of app state and draw the spots on the other charts using 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 |
Beta Was this translation helpful? Give feedback.
I was able to get the interactivity that I wanted.
Incase anyone else is interested.
I was able to use the
touchCallback
inLineTouchTooltipData
.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
ofdotData
ofLineChartBarData
.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