修改界面

master
夜笙歌 3 years ago
parent 9f10769bf7
commit 7eb710fb7f

@ -89,20 +89,28 @@ $(() => {
})
autoUpdate(url + "/selectBaseQilist", 40000, data => {
console.log(data)
lineChart(null, document.getElementById("quality"))
lineChart({
xName: data[0].list.map(val => val.name),
yData: data[0].list.map(val => val.rate),
yDataName: data[0].code,
}, document.getElementById("quality"),'%')
})
autoUpdate(url + "/selectDtNenglist", INTERVAL, data => {
let month = ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"]
let value = []
let target = []
for (let i = 1; i <= 12; i++) {
if(data[0][`month${i}`]){
value.push(data[0][`month${i}`])
target.push(data[0][`target`])
}
}
lineChart({
xName: month.splice(0,value.length),
yData: value,
yDataName: "单台能耗(元/台)"
yDataName: "单台能耗(元/台)",
yDataTwo: target,
yDataTwoName: "目标"
}, document.getElementById("energyConsumption"), '')
})

@ -1021,7 +1021,6 @@ const lineChart = function (data, id,unit='') {
},
axisLabel: {
show: true,
formatter:`{c}${unit}`,
textStyle: {
color: '#ffffff',
},
@ -1047,7 +1046,7 @@ const lineChart = function (data, id,unit='') {
label: {
//图形上的文本标签
normal: {
formatter: '{c}%',
formatter: `{c}${unit}`,
show: true,
position: "top",
textStyle: {
@ -1078,7 +1077,7 @@ const lineChart = function (data, id,unit='') {
label: {
//图形上的文本标签
normal: {
formatter: '{c}%',
formatter: `{c}${unit}`,
show: true,
position: "top",
textStyle: {

Loading…
Cancel
Save