This commit is contained in:
lb 2024-01-04 16:58:43 +08:00
parent e1e73b341d
commit 9d3c877628
4 changed files with 5 additions and 5 deletions

View File

@ -164,7 +164,7 @@ function getOptions(period, trend) {
},
},
series: {
data: trend[period].map(item => item.toFixed(2)),
data: trend[period].map(item => item != null && (+item).toFixed(2)),
type: "line",
symbol: "circle",
symbolSize: 6,

View File

@ -40,7 +40,7 @@ function Energy(props) {
<span className={cls.shadowBorder + " " + cls.infoText}>
<span style={{ lineHeight: 1.5 }}>天然气I/Nm³</span>
<span style={{ lineHeight: 1.5 }}>
{energyInfo?.ngQty1?.replace("Nm³", "") || "0"}
{energyInfo?.ngQty1?.replace("Nm³", "") || "0Nm³"}
</span>
</span>
<span className={cls.shadowBorder + " " + cls.infoText}>
@ -52,7 +52,7 @@ function Energy(props) {
<span className={cls.shadowBorder + " " + cls.infoText}>
<span style={{ lineHeight: 1.5 }}>天然气II/Nm³</span>
<span style={{ lineHeight: 1.5 }}>
{energyInfo?.ngQty2?.replace("Nm³", "") || "0"}
{energyInfo?.ngQty2?.replace("Nm³", "") || "0Nm³"}
</span>
</span>
</div>

View File

@ -163,7 +163,7 @@ function getOptions(period, trend) {
},
},
series: {
data: trend[period].map(item => item.toFixed(3)),
data: trend[period].map(item => item != null && (+item).toFixed(2)),
type: "line",
symbol: "circle",
symbolSize: 6,

View File

@ -101,7 +101,7 @@ export function getOptions(period, source, trend, options = {}) {
? null
: (+item.qty).toFixed(2)
)
: trend[period],
: trend[period].map(item => item != null && (+item).toFixed(2)),
type: "line",
symbol: "circle",
symbolSize: 6,