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

Tooltips callback doesn't work in Blazor Server #47

Open
riley-cochrane opened this issue Jul 20, 2023 · 1 comment
Open

Tooltips callback doesn't work in Blazor Server #47

riley-cochrane opened this issue Jul 20, 2023 · 1 comment
Assignees
Labels
help wanted Extra attention is needed

Comments

@riley-cochrane
Copy link

Describe the bug
Does not work in .NET 6.0 Blazor Server.

To Reproduce
Can reproduce by creating a fresh .NET 6 Blazor Server project, importing latest nuget version, and copying over relevant files from Demo site. I have replicated in this repo here: https://github.com/riley-cochrane/ChartJSTest
Run site
Go to https://localhost:7245/testgraph
Hover over bar on bar graph and no tool tip displays.

Console displays error:
Uncaught Error: The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead. at y (blazor.server.js:1:1840) at e.invokeMethod (blazor.server.js:1:2834) at config.options.plugins.tooltip.callbacks.title (Chart.js:81:27) at Tooltip.getTitle (chart.js:11425:35) at Tooltip.update (chart.js:11510:25) at Tooltip.handleEvent (chart.js:11875:14) at Object.afterEvent (chart.js:11936:25) at callback (chart.js:53:15) at PluginService._notify (chart.js:6316:11) at PluginService.notify (chart.js:6303:25)

Any fix for this? Can make local changes to create a new version if necessary.

Thanks,
Riley

@erossini
Copy link
Owner

erossini commented Aug 1, 2023

Hey,
sorry for the late reply.

I have a similar problem with NET7 but not with NET6: the component is build on NET6. Let me check what cause this issue.

@erossini erossini self-assigned this Aug 1, 2023
@erossini erossini added the help wanted Extra attention is needed label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants