This commit is contained in:
lb
2024-01-04 16:44:15 +08:00
parent ac772e2caf
commit e1e73b341d
4 changed files with 19 additions and 10 deletions

View File

@@ -145,7 +145,7 @@ function getOptions(data, chart_type) {
axisPointer: {
type: "shadow",
},
className: 'xc-chart-tooltip'
className: "xc-chart-tooltip",
// backgroundColor: ''
},
xAxis: {
@@ -207,7 +207,9 @@ function getOptions(data, chart_type) {
fontSize: 10,
color: "#fffc",
},
data: (dataList || []).map((item) => item.value),
data: (dataList || []).map((item) =>
item.value == null || isNaN(+item.value) ? null : (+item.value).toFixed(2)
),
},
],
};

View File

@@ -147,7 +147,10 @@ function getOptions(period, trend) {
},
},
series: {
data: trend[period].map((item) => item.qty),
// !(item.value == null || isNaN(+item.value)) ? (+item.value).toFixed(2) : null
data: trend[period].map((item) =>
item.qty == null || isNaN(+item.qty) ? null : (+item.qty).toFixed(2)
),
type: "line",
symbol: "circle",
symbolSize: 6,