Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake `Chart.Animation/animations/Tooltip` importable #5382
Merged
+975
−921
Conversation
@@ -1,5 +1,6 @@ | |||
{ | |||
"indent-style": "tabs", | |||
"line-end-style": false, |
This comment has been minimized.
This comment has been minimized.
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.
/** | ||
* @namespace Chart.Tooltip.positioners | ||
*/ | ||
exports.positioners = positioners; |
This comment has been minimized.
This comment has been minimized.
simonbrunel
Apr 1, 2018
Author
Member
@etimberg I'm not sure why we need to expose positioners (Chart.Tooltip.positioners
)
This comment has been minimized.
This comment has been minimized.
etimberg
Apr 1, 2018
Member
It must be a backwards compatibility thing. Not sure when it first got introduced
This comment has been minimized.
This comment has been minimized.
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'
}
}
This comment has been minimized.
This comment has been minimized.
} | ||
// If the user provided a sorting function, use it to modify the tooltip items | ||
if (opts.itemSort) { | ||
tooltipItems = tooltipItems.sort(function(a, b) { |
This comment has been minimized.
This comment has been minimized.
A1vinSmith
Jul 31, 2019
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.
simonbrunel commentedApr 1, 2018
Relates to #4478