Skip to content

Conversation

ian-pvd
Copy link
Owner

@ian-pvd ian-pvd commented Mar 29, 2019

var list = document.createElement('ul');
list.setAttribute('class', chart.id + '-legend');

if (datasets.length) {

Choose a reason for hiding this comment

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

I'd probably remove this and instead handle it in the for-loop. Also, it's more inline with the project's coding standards to declare all variables at the top of the method. Overall this PR looks good to me though

var list = document.createElement('ul');
var i, ilen, listItem, listItemSpan;

list.setAttribute('class', chart.id + '-legend');

for (i = 0, ilen = datasets.length || 0; i < ilen; i++) {

Choose a reason for hiding this comment

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

Note the same comment would apply to the other two files as well

Copy link
Owner Author

Choose a reason for hiding this comment

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

Hey @benmccan, thanks for your feedback on this. I've made additional code review fixes which you can preview in this commit: 1a01415

Please let me know if there's anything else I can do to help progress these changes. For example, I don't seem to be able to re-open the original PR into the chartjs repository, which I think is necessary for these changes to show up there.

Thank you again for your help here.

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

Successfully merging this pull request may close these issues.

2 participants