lineOptions.js
482 Bytes
import _ from 'lodash'
function setOptions ({ title, xAxisData, yAxisData }) {
var options = {
title: {
text: title || '',
x: '5%',
textAlign: 'left'
},
xAxis: {
type: 'category',
data: xAxisData
},
yAxis: {
type: 'value'
},
series: [{
data: yAxisData,
type: 'line'
}],
grid: {
x: 50,
y: 50,
x2: 30,
y2: 50
}
}
return _.cloneDeep(options)
}
export { setOptions }