-
Notifications
You must be signed in to change notification settings - Fork 12k
Description
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(""); }