-
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
Issue #2252, added usePointStyle option to allow label boxes to match… #2902
Conversation
…o match the shape(pointStyle) of the corresponding data.
@@ -52,6 +52,7 @@ module.exports = function(Chart) { | |||
lineJoin: dataset.borderJoinStyle, | |||
lineWidth: dataset.borderWidth, | |||
strokeStyle: dataset.borderColor, | |||
pointStyle: dataset.pointStyle, |
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.
We should document this in Legend Item Interface
section of 01-Chart-Configuration.md
+1 to merge. @slinhart nothing jumped out at me while looking at this. |
This looks awesome (assuming it works as defined), but could you please fix that merge conflict @slinhart? |
Conflicts: src/core/core.legend.js
@zachpanz88 merged 😁 |
Looks good to me! Very cool! |
Do these merged commits on pull requests ever require the version number be bumped? I was previously using the npm version of chart.js and it is also version 2.1.6, but doesn't include the changes in this issue. |
@neilmonroe this will be included in the next release |
Solution to this issue: #2252
New option added: options.legend.labels.usePointStyle (Boolean)
When true, legend "boxes" will be drawn in the same shape as the pointStyle specified for the data.
Simple screenshot for clarity.