|
|
|
@ -64,7 +64,7 @@ export default defineComponent({
|
|
|
|
|
textStyle: {
|
|
|
|
|
color: '#000'
|
|
|
|
|
},
|
|
|
|
|
interval: 0, //显示所有X轴信息
|
|
|
|
|
// interval: 0, //显示所有X轴信息
|
|
|
|
|
rotate: -40 //倾斜角度
|
|
|
|
|
},
|
|
|
|
|
data: []
|
|
|
|
@ -175,15 +175,19 @@ export default defineComponent({
|
|
|
|
|
const initeCharts = () => {
|
|
|
|
|
let myChart = echarts.init(document.getElementById('myChart'))
|
|
|
|
|
// 绘制图表
|
|
|
|
|
console.log(state.option)
|
|
|
|
|
myChart.setOption(state.option)
|
|
|
|
|
}
|
|
|
|
|
const setData = (e) => {
|
|
|
|
|
let X = e.SpeedList.map(v => v.time)
|
|
|
|
|
let Y1 = e.SpeedList.map(v => v.speed)
|
|
|
|
|
let X = e.TPList.map(v => v.time)
|
|
|
|
|
let Y1 = []
|
|
|
|
|
let Y2 = e.TPList.map(v => v.temperature)
|
|
|
|
|
let Y3 = e.TPList.map(v => v.press)
|
|
|
|
|
const {option} = toRefs(state)
|
|
|
|
|
X.forEach(res => {
|
|
|
|
|
Y1.push(e.SpeedList.find(v => v.time === res)?.speed || 0)
|
|
|
|
|
})
|
|
|
|
|
console.log(X)
|
|
|
|
|
console.log(Y1)
|
|
|
|
|
option.value.xAxis.data = X
|
|
|
|
|
option.value.series[0].data = Y1
|
|
|
|
|
option.value.series[1].data = Y2
|
|
|
|
|