Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BranislavBrnjos opened this issue May 24, 2022 · 0 comments

Comments

@BranislavBrnjos
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant