优化温湿度图表展示问题

This commit is contained in:
BianLzhaoMin 2024-09-30 09:31:04 +08:00
parent 65fbfb1fff
commit 9abf12e317
3 changed files with 31 additions and 11 deletions

View File

@ -9,3 +9,4 @@ VUE_APP_BASE_API = '/prod-api'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -321,21 +321,18 @@ export default {
}) })
// //
let tempOption = { let tempOption = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
valueFormatter: (value) => {
return value + '°C'
},
},
grid: { grid: {
left: '3%', left: '3%',
right: '4%', right: '4%',
bottom: '3%', bottom: '3%',
containLabel: true, containLabel: true,
}, },
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
},
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
@ -350,6 +347,10 @@ export default {
type: 'value', type: 'value',
name: '°C', name: '°C',
}, },
{
type: 'value',
name: '%rh',
},
], ],
series: [ series: [
{ {
@ -377,6 +378,15 @@ export default {
), ),
borderRadius: [3, 3, 0, 0], borderRadius: [3, 3, 0, 0],
}, },
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
valueFormatter: (value) => {
return value + '°C'
},
},
}, },
{ {
name: '湿度', name: '湿度',
@ -391,6 +401,15 @@ export default {
color: '#FE8511', color: '#FE8511',
}, },
}, },
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
valueFormatter: (value) => {
return value + '%rh'
},
},
// areaStyle: { // areaStyle: {
// color: { // color: {
// x: 0, // x: 0,
@ -430,7 +449,7 @@ export default {
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
name: '%rh', name: 'm/s',
}, },
series: [ series: [
{ {

View File

@ -51,7 +51,7 @@ module.exports = {
// target: `http://192.168.2.234:49080`, //福 // target: `http://192.168.2.234:49080`, //福
// target: `http://192.168.2.12:18080`, //阮 // target: `http://192.168.2.12:18080`, //阮
// target: `http://192.168.0.110:18080`, //马 // target: `http://192.168.0.110:18080`, //马
target: `http://192.168.0.14:19900`, //马 target: `http://192.168.2.12:18080`, //马
//******** 注意事项 ********* */ //******** 注意事项 ********* */
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target; //1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;