-
Notifications
You must be signed in to change notification settings - Fork 158
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
LinearCartesianTicks Callback #173
Comments
You're correct. Although this code is fine and will work on client-side Blazor (tested), callbacks with return value not supported on server-side Blazor. If you open the developer tools of your browser, you should see a console message like this: In order to achieve the result you want, you'll have to write a JavaScript method and attach it with a The underlying problem here is well known and documented under #90 so I'll close your issue. If you have any ideas on how to solve this issue, comment on #90. Thanks! |
Thank you for your prompt reply, and your work on this library! Ok, I've created a JavaScript file, and referenced it properly in _Hosts.cshtml (I've tested to make sure the reference is working). In it, there's a function called yTickCallback using the callback from here: https://www.chartjs.org/docs/latest/axes/labelling.html
And I've changed the relevant chart config code to:
However it doesn't appear to have an effect on the chart, and I'm not getting any errors in the console. Any ideas? ---EDIT---
And defining the callback with the namespace:
|
Perfect, I'm glad you got it working. If you have any other questions just open a new issue :) |
Hi,
I'm having trouble getting my tick callback method to fire in my server-side app
My testing so far has been on a stacked bar chart
Here is my code, the callback does not get called, and the format of the ticks of the chart stay as the default
The text was updated successfully, but these errors were encountered: