This commit is contained in:
lb
2024-01-04 10:58:20 +08:00
parent 0b1d3aa4b3
commit ac772e2caf
15 changed files with 241 additions and 111 deletions

View File

@@ -85,7 +85,7 @@ function getOptions(source, period, trend) {
if (trend[source].length == 0) return null;
return {
color: ["#FFD160", "#12FFF5", "#2760FF"],
grid: { top: 38, right: 12, bottom: 20, left: 48 },
grid: { top: 40, right: 12, bottom: 20, left: 80 },
xAxis: {
type: "category",
// data: Array(7)
@@ -112,18 +112,20 @@ function getOptions(source, period, trend) {
},
},
yAxis: {
name: "单位m³/h",
name: "单位/%",
nameTextStyle: {
color: "#fff",
fontSize: 10,
fontSize: 16,
align: "right",
},
type: "value",
axisLabel: {
color: "#fff",
fontSize: 12,
fontSize: 16,
formatter: "{value} %",
},
min: 0,
max: 100,
axisLine: {
show: true,
lineStyle: {
@@ -141,7 +143,7 @@ function getOptions(source, period, trend) {
},
series: [
{
data: trend[source].map((item) => item.value),
data: trend[source].map((item) => !(item.value == null || isNaN(+item.value)) ? (+item.value).toFixed(2) : null),
type: "line",
symbol: "circle",
symbolSize: 6,