xanderdeseyn / react-native-responsive-linechart

A customizable and responsive line or area chart for react-native
https://react-native-responsive-linechart.surge.sh
MIT License
202 stars 46 forks source link

no handler is called when tapping the tooltip #113

Open tlow92 opened 3 years ago

tlow92 commented 3 years ago
  1. Select index on Line which creates a tooltip
  2. Select same index again
  3. Tooltip hides but no handler is called

Ideally we want to call a handler in that case. Otherwise we are unable to know if the user pressed the tooltip. Often times you have additional logic which e.g. shows numbers outside of the actual chart that depend on the selected index.

I suspect we need to add something like onDismiss(), since changing onTooltipSelect to allow for undefined input will break previous versions.

We then could call onDismiss here to be able to detect this change. @N1ghtly If you are fine with the change I can also create a PR for this. https://github.com/N1ghtly/react-native-responsive-linechart/blob/1f2c9cdcbf69d4632dbaa2b086926760e126bff5/src/Line.tsx#L105

SyedSaifAli commented 1 year ago

Hey @tlow92 Were you able to solve this somehow? I am also not able to identify whether use has preseed the tooltip or not in IOS.