mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Using helper.each instead of Array.prototype.map
This commit is contained in:
parent
0f49be56a4
commit
b8b7c85c5e
@ -79,6 +79,9 @@
|
||||
});
|
||||
|
||||
helpers.each(data,function(datapoint, index){
|
||||
if (!datapoint.color) {
|
||||
datapoint.color = 'hsl(' + (360 * index / data.length) + ', 100%, 50%)';
|
||||
}
|
||||
this.addData(datapoint, index, true);
|
||||
},this);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user