Skip to content
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

Docs/clarify usage of ticks callback (#9991) #9994

Merged
merged 2 commits into from Dec 16, 2021

Conversation

doug-a-brunner
Copy link
Contributor

Per discussion in #9991, this clarifies the responsibilities of ticks callback functions and adds an example.

@etimberg etimberg added this to the Version 3.7.0 milestone Dec 15, 2021
etimberg
etimberg previously approved these changes Dec 15, 2021
Keep in mind that overriding `ticks.callback` means that you are responsible for all formatting of the label. Depending on your use case, you may want to call the default formatter and then modify its output. In the example above, that would look like:

```javascript
// call the default formatter, forwarding `this`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there's some leading whitespace here which could be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept the leading whitespace the same as in the example above, to emphasize that the snippet would substitute for return '$' + value;.

Copy link
Collaborator

@LeeLenaleee LeeLenaleee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming for the ticks array don't match, I think the naming you used now is better as in the example above where it is called values.

So if you could change that it would match better and be more clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants