Replies: 1 comment 2 replies
-
Hi. Got it. did you try to open an issue to follow it up? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Guys,
I generate my LineChartBarData based on model.
I then want to let user interact with the model via LineTouchData.
LineTouchData.lineBarSpots!.first.bar
seemed to reference the LineChartBarData.So I tried to extend LineChartBarData to contain my metadata and set this extended object as LineChartBarData. It works, data is displayed.
However when I try:
the
if (p1.lineBarSpots!.first.bar is LineBarDataMeta)
part is never true.How else can I pass some metadata to the lineTouchData.touchCallback in order to get it when processing the callback?
Edit:
Okay, I get it. There is
p1.lineBarSpots![n].barIndex
The problem is that if you have two or more spots with the same X-coordinate you do not know which one you tap.
They are ordered by y-value.
And moreover the FlTapDownEvent has coordinates in "screen" coordinates, however the spot is in the chart coordinates. (x/y values).
This is going to be a nightmare!
How to know which one of the spots I clicked?
Beta Was this translation helpful? Give feedback.
All reactions