-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
afterBuildTicks not working in 2.7.0 #4749
Comments
@asfktz Thank you for this detailed bug report and really sorry for the inconvenience. I didn't realize that these callbacks was public, I thought it was used only internally or when sub-classing a scale class. 2.7.0 (not intentionally) breaks backward compatibility when I knew it was a sensible change, maybe we should have dropped the "major" concept instead?! Not sure what the best way to fix these cases now? @etimberg any thoughts? @asfktz FWIW and until we figure out a fix, for the first axis (with days), I think you can use the new |
Hmmm this is hard. could we provide a property for |
Thanks for the quick response, @simonbrunel.
Oh, I see.
It's OK (: I liked Having the ability to build the ticks however I like is very flexible. Thanks for both of you for such a great library 🙏 |
What is the solution of this in 2.7.0. |
I don't think the The So we should be able to change the ticks back so that they're no longer objects |
I'm not sure I would go this way (reverting ticks as simple values), the issue being the general scale architecture that makes really complicated implementation changes, for example: function buildTicks() {
var count = this.options.count;
this.ticks = ... // generate ticks
} vs function buildTicks(count) {
return ... // generate ticks
} The second option is much better when it comes to modify internal structure, for example changing the tick format and that's what I tried to do in #4573. I don't think we will find an easy fix for 2.7.1, so let's postpone this ticket for later. |
Seems like
afterBuildTicks
stopped working in 2.7.0before (2.6.0)
after (2.7.0)
I used it like this:
I also made a simple example to demonstrate it:
https://jsbin.com/titegozipu/edit?html,js,output
Try change the version of chart.js in the html
The text was updated successfully, but these errors were encountered: