Commit 056d4107 authored by 李纪文's avatar 李纪文

fix: 修改统计曲线

parent 4046ce69
...@@ -219,6 +219,7 @@ const StatisticalHistoryView = (props) => { ...@@ -219,6 +219,7 @@ const StatisticalHistoryView = (props) => {
if (!dataInfo) return setOptions(null); if (!dataInfo) return setOptions(null);
const { unit, dName } = data; const { unit, dName } = data;
const series = []; const series = [];
let xData = [];
dataInfo.data.forEach((item, index) => { dataInfo.data.forEach((item, index) => {
const config = !index && dName.indexOf('流量') > -1 ? { areaStyle: {} } : {}; const config = !index && dName.indexOf('流量') > -1 ? { areaStyle: {} } : {};
const style = index ? { lineStyle: { normal: { type: 'dashed' } } } : {}; const style = index ? { lineStyle: { normal: { type: 'dashed' } } } : {};
...@@ -236,6 +237,9 @@ const StatisticalHistoryView = (props) => { ...@@ -236,6 +237,9 @@ const StatisticalHistoryView = (props) => {
}), }),
}; };
series.push(list); series.push(list);
xData = item.map((arr) => {
return arr.pt;
});
}); });
const option = { const option = {
title: { title: {
...@@ -274,6 +278,7 @@ const StatisticalHistoryView = (props) => { ...@@ -274,6 +278,7 @@ const StatisticalHistoryView = (props) => {
type: 'dashed', type: 'dashed',
}, },
}, },
data: xData,
}, },
], ],
yAxis: [ yAxis: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment