-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to turn off TouchTooltipData when touching a chart #33
Comments
Solved with
returning null at |
Hi, |
Keep rocking! Hope to send my first PR soon :D |
|
Guys, currently you can't implement normal touch events in the chart, |
Hi,
As Iman told us the normal touch is a feature that will come eventually later. If you want to make an issue I will be really happy to thumb it up. |
awesome! and if you want to show only the tooltip for a specific line you can use this LineChartData(
lineTouchData: LineTouchData(touchTooltipData: LineTouchTooltipData(getTooltipItems: (touchedSpots) {
return touchedSpots.map((touchedSpot) {
if (touchedSpot.barIndex == 0) { // show the tooltips for the first line defined in the list of `lineBarsData`
return LineTooltipItem(
'${touchedSpot.y}',
TextStyle(color: touchedSpot.bar.color),
);
}
return null; // hide tool tip for all other lines in the current chart that can have many lines.
}).toList();
})),
//...
) in my case that was pretty usefull, thank you @davidmarinangeli |
How can I avoid the popup data to show when I touch the
LineChart
? I tried putting the objecttouchTooltipData:
inLineTouchData
at null but then my state is not updated correctly to my other widgets.Another related question: how can I let the chart listen to normalPress and not only longPress? Each time I try to interact with the chart I have to "longpress" it
The text was updated successfully, but these errors were encountered: