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
Apply scale context to ticks scriptable options instead of chart context #8839
Conversation
It might be better to set the context already here: Chart.js/src/core/core.scale.js Line 240 in 873223f
I'd think it would prevent the mock tests failing too. Not sure if it causes any other failures though. |
I haven't seen it. I have fixed changed the test cases. Anyway let me try your hint. |
@kurkle I think your hint is to set the If yes, are you thinking something like the following? init(options) {
const me = this;
me.options = options;
me.options.ticks = options.ticks.setContext(me.getContext()); |
Actually I was thinking for the whole scale options. This should be the only change required. init(options) {
const me = this;
me.options = options.setContext(me.getContext()); |
Done as @kurkle suggested and sounds working. Thanks a lot! |
Fixes #8835