8 ms·
What's wrong with: return { labels: data.items.map(function(value){ return { type: "label", value: valu
by mishoo 9y ago
What's wrong with:
return {
labels: data.items.map(function(value){
return {
type: "label",
value: value > 10 ? value : value * 100
};
})
};
I hope your project does not get too popular.
- addicted 9y agoEven cleaner with ES6. return { labels: data.items.map(value => { type: "label", value: value > 10 ? value : value * 100 }) };