温度管理:样式优化

This commit is contained in:
fengrong 2024-11-08 14:12:24 +08:00
parent 9844428619
commit bdfb9f83dc

View File

@ -103,6 +103,7 @@ const inittemperatureChar = () => {
xAxis: { xAxis: {
type: 'value', type: 'value',
interval: 10, interval: 10,
z:10,
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
@ -131,29 +132,27 @@ const inittemperatureChar = () => {
yAxis: [ yAxis: [
{ {
type: 'category', type: 'category',
nameTextStyle: { z: 10,
color: '#4E5969',
},
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
color: '#ffffff', color: '#ffffff',
width: 0, width: 1,
type: 'solid', type: 'solid',
}, },
}, },
axisLabel: { axisLabel: {
//x
show: true, show: true,
textStyle: { textStyle: {
color: '#4E5969', color: '#4E5969',
}, },
}, },
axisTick: { show: false }, axisTick: { show: true },
splitLine: { splitLine: {
interval: 50, interval: 50,
lineStyle: { lineStyle: {
type: 'solid', type: 'solid',
width:1,
color: '#ffffff', color: '#ffffff',
}, },
}, },
@ -164,10 +163,10 @@ const inittemperatureChar = () => {
series: [ series: [
{ {
type: 'bar', type: 'bar',
barWidth: 40, //barWidth: 40,
itemStyle: { itemStyle: {
color: '#0064AA', color: '#0064AA',
barBorderRadius: 2 barBorderRadius: 2,
}, },
label:{ label:{
show:true, show:true,
@ -180,32 +179,35 @@ const inittemperatureChar = () => {
{ {
name: '上限值', name: '上限值',
type: 'bar', type: 'bar',
barWidth: 40, //barWidth: 40,
barGap: '-100%', barGap: '-100%',
data: temperatureData.limit1High, data: temperatureData.limit1High,
itemStyle: { itemStyle: {
color: '#ccecea', color: '#ccecea',
//borderColor: '#ffffff',
}, },
z:2 z:2
}, },
{ {
name: '下限值', name: '下限值',
type: 'bar', type: 'bar',
barWidth: 40, //barWidth: 40,
barGap: '-100%', barGap: '-100%',
data: temperatureData.limit1Low, data: temperatureData.limit1Low,
itemStyle: { itemStyle: {
color: '#ccecea', color: '#ccecea',
//borderColor: '#ffffff',
}, },
z:2 z:2
}, },
{ {
name: '上上限值', name: '上上限值',
type: 'bar', type: 'bar',
barWidth: 40, //barWidth: 40,
barGap: '-100%', barGap: '-100%',
itemStyle: { itemStyle: {
color: '#fff0cc', color: '#fff0cc',
borderColor: '#ffffff',
}, },
data: temperatureData.limit2High, data: temperatureData.limit2High,
z:1 z:1
@ -213,11 +215,12 @@ const inittemperatureChar = () => {
{ {
name: '下下限值', name: '下下限值',
type: 'bar', type: 'bar',
barWidth: 40, //barWidth: 40,
barGap: '-100%', barGap: '-100%',
data: temperatureData.limit2Low, data: temperatureData.limit2Low,
itemStyle: { itemStyle: {
color: '#fff0cc', color: '#fff0cc',
borderColor: '#ffffff',
}, },
z:1 z:1
}, },
@ -231,7 +234,6 @@ const attributesCode:any[]=[]
const getChartData = (data: any) => { const getChartData = (data: any) => {
console.log(JSON.stringify(data)) console.log(JSON.stringify(data))
getTemperatureLimitByDeviceId(data).then((res) => { getTemperatureLimitByDeviceId(data).then((res) => {
debugger
if (res.code=='200') { if (res.code=='200') {
temperatureData.name=[] temperatureData.name=[]
temperatureData.values=[] temperatureData.values=[]