98 lines
1.7 KiB
JavaScript
98 lines
1.7 KiB
JavaScript
const colors = {
|
|
line: '#555'
|
|
}
|
|
|
|
export default (x_data, y_data) => ({
|
|
title: {
|
|
text: "窑车温度",
|
|
},
|
|
grid: [
|
|
{
|
|
id: 'temp-grid',
|
|
show: true,
|
|
top: 96,
|
|
left: 56,
|
|
right: 56,
|
|
bottom: 32,
|
|
},
|
|
{
|
|
id: 'lambda-grid',
|
|
top: 0,
|
|
left: 0,
|
|
right: 0,
|
|
bottom: 0
|
|
}
|
|
],
|
|
xAxis: [
|
|
{
|
|
gridIndex: 0,
|
|
id: 'temp-x-axis',
|
|
type: "category",
|
|
data: Array(65)
|
|
.fill(1)
|
|
.map((val, index) => {
|
|
return val + index;
|
|
}),
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: colors.line
|
|
},
|
|
},
|
|
},
|
|
{
|
|
gridIndex: 1,
|
|
id: 'lambda-x-axis',
|
|
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: '<strong style="font-size: 16px">位置</strong> ({b}) <span style="font-size: 16px; font-weight: bold;">{c}</span> ℃'
|
|
},
|
|
dataZoom: {
|
|
type: 'inside'
|
|
},
|
|
series: [
|
|
{
|
|
data: y_data,
|
|
// data: Array(65)
|
|
// .fill(1)
|
|
// .map((val) => Math.floor(Math.random() * 1000)),
|
|
type: "line",
|
|
},
|
|
],
|
|
}) |