Option for determining if tick is major#6260
Option for determining if tick is major#6260benmccann wants to merge 1 commit intochartjs:masterfrom
Conversation
|
I think you should be able to change |
As a user, it's much harder to create an entirely new scale type overriding |
I was referring to the callback: https://www.chartjs.org/docs/latest/axes/#callbacks |
|
Ah, yeah, that would probably work if we made |
|
I think this is actually required after all to avoid major performance regression in #6274. I shared an explanation in Slack. Maybe easier to discuss there to cover the different cases |
The current code has hardcoded that a major tick is one that aligns with
startOf(value, majorUnit). However, I've found many cases where I want a different behavior. E.g. in the financial charts we don't have weekends, so we might want to say the major tick is the first weekday of the month so that we have a majorTick begin each month. This adds an option calledisMajorwhich takes afunctionto make the logic configurable.