-
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
Add back Chart.Ticks.formatters #5088
Conversation
ac5f291
to
d7f6173
Compare
Looks good, I would add unit tests ( expect(typeof Chart.Ticks).toBeDefined()
expect(typeof Chart.Ticks.formatters).toBeDefined()
expect(typeof Chart.Ticks.formatters.value).toBe('function')
// ... |
d7f6173
to
d19bc43
Compare
Thanks for taking a look. I've added the tests |
test/specs/core.ticks.tests.js
Outdated
it('Should expose formatters api', function() { | ||
expect(typeof Chart.Ticks).toBeDefined(); | ||
expect(typeof Chart.Ticks.formatters).toBeDefined(); | ||
expect(typeof Chart.Ticks.formatters.linear).toBe('function'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's safer to add all:
expect(typeof Chart.Ticks.formatters.linear).toBe('function');
expect(typeof Chart.Ticks.formatters.logarithmic).toBe('function');
expect(typeof Chart.Ticks.formatters.value).toBe('function');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Updated
d19bc43
to
01ce253
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @benmccann
Addresses #5021
Seems like we were too agressive. There's a few different people (me, @adamk33n3r, @cholt0425) that want to be able to use the default tick formatters that were previously available via
Ticks.formatters
. Accordingly, this PR adds backTicks.formatters
, but notTicks.generators
, which is what I think we were most interested in making private