Abhinandan-Kushwaha / react-native-gifted-charts

The most complete library for Bar, Line, Area, Pie, Donut, Stacked Bar and Population Pyramid charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.
https://www.npmjs.com/package/react-native-gifted-charts
MIT License
772 stars 152 forks source link

Donut Pie Chart focusOnPress crashes if tapping edge of circle. #296

Closed StevenGonzalez closed 1 year ago

StevenGonzalez commented 1 year ago

Describe the bug On the Donut PieChart when focusOnPress is true and the circle has been expanded by pressing on it, if you then tap on the edge of the expanded circle it crashes with the error: "undefined is not a function"

To Reproduce Create a PieChart with at least 2 items. Set donut true, focusOnPress true, and toggleFocusOnPress true Tap the circle once to select an item. Once the item has been selected and that portion of the circle has expanded to show the selection, tap the very edge of the expanded circle.

Expected behavior When pressing on the circle anywhere after the circle has expanded, the focusOnPress handles unexpanding correctly and does not throw an exception.

Screenshots image

Tested on both Android and iOS Package version 1.2.42

PBallal0702 commented 1 year ago

Facing same issue

Abhinandan-Kushwaha commented 1 year ago

Hey @StevenGonzalez @PBallal0702 Thanks for pointing out the issue, it has been resolved in version 1.3.1🎉