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

@@ -84,7 +84,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: 56 },
xAxis: {
type: "category",
// data: Array(7)
@@ -111,17 +111,17 @@ function getOptions(source, period, trend) {
},
},
yAxis: {
name: "单位m³/h",
name: "单位mg/m³",
nameTextStyle: {
color: "#fff",
fontSize: 10,
fontSize: 12,
align: "right",
},
type: "value",
axisLabel: {
color: "#fff",
fontSize: 12,
formatter: "{value} %",
formatter: "{value}",
},
axisLine: {
show: true,
@@ -140,7 +140,11 @@ 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,