Make Chart.Animation/animations/Tooltip importable
#5382
Merged
Conversation
| @@ -1,5 +1,6 @@ | |||
| { | |||
| "indent-style": "tabs", | |||
| "line-end-style": false, | |||
simonbrunel
Apr 1, 2018
Author
Member
@loicbourgois I had to disable this rule, else we can't run gulp lint on Windows with Git configured to AutoCrlf.
@loicbourgois I had to disable this rule, else we can't run gulp lint on Windows with Git configured to AutoCrlf.
| /** | ||
| * @namespace Chart.Tooltip.positioners | ||
| */ | ||
| exports.positioners = positioners; |
etimberg
Apr 1, 2018
Member
It must be a backwards compatibility thing. Not sure when it first got introduced
It must be a backwards compatibility thing. Not sure when it first got introduced
simonbrunel
Apr 1, 2018
Author
Member
Actually, I think it was public to allow users to implement their own logic:
Chart.Tooltip.positioners.foobar = function(elements) {
// ...
};
options: {
tooltips: {
position: 'foobar'
}
}
Actually, I think it was public to allow users to implement their own logic:
Chart.Tooltip.positioners.foobar = function(elements) {
// ...
};
options: {
tooltips: {
position: 'foobar'
}
}
8 of 9 tasks
| } | ||
| // If the user provided a sorting function, use it to modify the tooltip items | ||
| if (opts.itemSort) { | ||
| tooltipItems = tooltipItems.sort(function(a, b) { |
A1vinSmith
Jul 31, 2019
tooltipItems.sort(function(a, b) {
return opts.itemSort(a, b, data);
});
remove self-assignment
tooltipItems.sort(function(a, b) {
return opts.itemSort(a, b, data);
});
remove self-assignment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Relates to #4478