最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

flutter - Prevent multiple touch points in fl_chart line chart? - Stack Overflow

programmeradmin0浏览0评论

I am currently using fl_chart library to build this chart in flutter and have multiple lines joined together.

When I try to touch on the graph to see the tooltip, I sometimes get multiple touch points as shown by multiple vertical lines in the picture shared but I don't want that, I want only one point to have this vertical line.

LineChart(
...
lineTouchData: LineTouchData(
     touchSpotThreshold: 1,
     )
)

The issue with this approach is that it requires a very precise touch to show the tooltip which isn't that good for the UX.

Is this the correct way to do this? If not then how to fix this? Thanks for any help in advance

发布评论

评论列表(0)

  1. 暂无评论