react-native-animated-charts
react-native-animated-charts copied to clipboard
Tried to Synchronously call function {functionName} from a different thread.
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:

Example Format Function:

Example formatCurrency Function:

Error Example:

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.

Example:

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