imaNNeo / fl_chart

FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.
https://flchart.dev
MIT License
6.84k stars 1.77k forks source link

Tapping outside of pie chart intercepts the gesture #1307

Open jtkeyva opened 1 year ago

jtkeyva commented 1 year ago

** Don't make a duplicate issue. You can search in issues to make sure there isn't any already opened issue with your concern.

Describe the bug I have 2 pie charts stacked on top of eachother. I cannot intercept the gesture on the bottom pie chart. I set up a print statement to get the index for each segment on the top one and i notice it prints -1. So that tells me the transparent area behind the piechart is intercepting the getstures.

To Reproduce Put a pie chart on top of a box (or any other widget) of the same width as the pie chart that has a gesture recognizer. Try and get the box underneath to respond to touches just outside of the circular pie chart. The box underneath does not respond.

Screenshots If applicable, add screenshots, or videoshots to help explain your problem.

Versions Latest Latest

aabirsark commented 1 year ago

I think you can solve this problem by wrapping IgnorePointer() on the top pie chart !

jtkeyva commented 1 year ago

@aabirsark thanks, but wouldn't that disable any interaction on the pie chart itself? i'm looking to be able to tap each slice of the pie as well as the widget that surrounds it

aabirsark commented 1 year ago

@jtkeyva what I would do in that case is too use a clipper and clip the piechart till you want the interaction

jtkeyva commented 1 year ago

ah so clip will allow taps to pass through the circular edges?

samir7osny commented 11 months ago

check this PR #1504