修改图表配置

master
夜笙歌 4 months ago
parent b2a710af39
commit 3b36181ff8

@ -124,13 +124,13 @@
success: function (result) {
tempData = eval(result);
var tempInfo = '';
for (var i = 0; i < tempData.length; i++) {
tempInfo += '<div class="echarts" id="' + tempData[i].name + '" style="height: 200px;width: 12.5%;float: left;" ></div>';
for (let i = 0; i < tempData.length; i++) {
tempInfo += '<div class="echarts" id="' + tempData[i].name + '" style="height: 260px;width: 12.5%;float: left;" ></div>';
/* tempInfo += '<div class="echarts" id="' + tempData[i].name + '" style="height: 200px;width: 12.5%;float: left;" ></div>'; */
/*info += '<div style="background-color: red;width: 200px;height: 200px;">'+tempData[i].name+'</div>' border: solid 1px greenyellow;padding: 10px 10px;;*/
}
$("#tempDiv").html(tempInfo);
for (var i = 0; i < tempData.length; i++) {
for (let i = 0; i < tempData.length; i++) {
var temperatureMeterChart = echarts.init(document.getElementById(tempData[i].name));
var temperatureMeterOption = {
title: {
@ -152,10 +152,31 @@
detail: {formatter: '{value}℃', fontSize: 12},
showSymbol: false,
animation: false, // 关闭动画
radius: '100%',
radius: '90%',
// startAngle: 180, // 仪表盘起始角度(默认 225
// endAngle: 0, // 仪表盘结束角度(默认 -45
data: [{value: tempData[i].value}]
data: [{value: tempData[i].value}],
axisLine: {
lineStyle: {
width: 10
}
},
axisTick: {
show: true,
length: 15,
lineStyle: {
color: 'auto',
width: 2
}
},
splitLine: {
length: 25,
lineStyle: {
color: 'auto',
width: 3
}
},
}
]
};

Loading…
Cancel
Save