const colors = { line: '#555' } export default (x_data, y_data) => ({ title: { text: "窑车温度", }, grid: { show: true, top: 96, left: 52, right: 32, bottom: 24, }, xAxis: { type: "category", data: Array(65) .fill(1) .map((val, index) => { return val + index; }), axisLine: { lineStyle: { color: colors.line }, }, }, yAxis: { type: "value", name: "温度", nameTextStyle: { fontSize: 18, align: "right", verticalAlign: "bottom", lineHeight: 36, padding: 10, }, axisLine: { show: true, lineStyle: { color: colors.line, }, }, axisLabel: { formatter: '{value} ℃' }, splitLine: { lineStyle: { color: '#ddd' } }, }, tooltip: { trigger: 'axis', formatter: '位置 ({b}) {c} ℃' }, dataZoom: { type: 'inside' }, series: [ { data: y_data, // data: Array(65) // .fill(1) // .map((val) => Math.floor(Math.random() * 1000)), type: "line", }, ], })