[O] Optimize series generation with [].map

This commit is contained in:
Hykilpikonna
2019-09-29 17:43:01 -04:00
parent 495e776971
commit e0c4426ebb
@@ -48,25 +48,13 @@ export default class GraphAverage extends Vue
}, },
// Data // Data
series: series: [1, 2].map(i =>
[ {
{ return {
type: 'bar', type: 'bar',
encode: encode: {x: 0, y: i}
{
x: 0,
y: 1
}
},
{
type: 'bar',
encode:
{
x: 0,
y: 2
}
} }
] })
}; };
// TODO: Remove this // TODO: Remove this