[O] Optimize series generation with [].map
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user