react-native-animated-charts icon indicating copy to clipboard operation
react-native-animated-charts copied to clipboard

Tried to Synchronously call function {functionName} from a different thread.

Open BranislavBrnjos opened this issue 3 years ago • 0 comments

Hello!

I am trying to get the X and Y value when hovering over the Chart.

I am using ChartYLabel & ChartXLabel components, and they give me access to the Y and X values, but they don't let me format them with an external function?

Example of the ChartXLabel Component: Screen Shot 2022-05-24 at 2 29 19 PM

Example Format Function: Screen Shot 2022-05-24 at 2 29 13 PM

Example formatCurrency Function: Screen Shot 2022-05-24 at 2 26 38 PM

Error Example: Screen Shot 2022-05-24 at 2 27 55 PM

I have also tried calling the useChartData, but I was not getting any updated data. I was only getting the initial Data.

Example Component using useChartData, note i was using it inside the ChartPathProvider. Screen Shot 2022-05-24 at 2 39 48 PM

Example: Screen Shot 2022-05-24 at 2 38 49 PM

If I try to call useState inside the useDerivedValue hook i will get the same error as per the first example.

BranislavBrnjos avatar May 24 '22 12:05 BranislavBrnjos