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

Legend not correct displayed for polar Area chart. #3059

Closed
luqiss opened this issue Jul 29, 2016 · 0 comments
Closed

Legend not correct displayed for polar Area chart. #3059

luqiss opened this issue Jul 29, 2016 · 0 comments

Comments

@luqiss
Copy link

luqiss commented Jul 29, 2016

in Chart.bundle.js in line 7215-7230 is little bug which effect by not correct display of legend for chart "Polar Area".

Now is:

legendCallback: function(chart) { var text = []; text.push('<ul class="' + chart.id + '-legend">'); if (chart.data.datasets.length) { for (var i = 0; i < chart.data.datasets[0].data.length; ++i) { text.push('<li><span style="background-color:' + chart.data.datasets[0].backgroundColor[i] + '">'); if (chart.data.labels[i]) { text.push(chart.data.labels[i]); } text.push('</li>'); } } text.push('</span></ul>'); return text.join(""); }

Should be:

legendCallback: function(chart) { var text = []; text.push('<ul class="' + chart.id + '-legend">'); if (chart.data.datasets.length) { for (var i = 0; i < chart.data.datasets[0].data.length; ++i) { text.push('<li><span style="background-color:' + chart.data.datasets[0].backgroundColor[i] + '"></span>'); if (chart.data.labels[i]) { text.push(chart.data.labels[i]); } text.push('</li>'); } } text.push('</ul>'); return text.join(""); }

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

No branches or pull requests

2 participants