Tooltips callback doesn't work in Blazor Server
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
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.
On NET 8 working but on NET 9(SSR) not.