diff --git a/src/components/Container.jsx b/src/components/Container.jsx index 4788185..c48d12c 100644 --- a/src/components/Container.jsx +++ b/src/components/Container.jsx @@ -5,6 +5,7 @@ import cls from './container.module.less'; import IconStack from '../assets/Icon/icon-stack.png'; import IconGood from '../assets/Icon/icon-good.png'; import IconCharger from '../assets/Icon/icon-charge.png'; +import IconSmoke from '../assets/Icon/icon-taiji.png'; const Container = (props) => { let icon = useRef(null); @@ -19,6 +20,9 @@ const Container = (props) => { case 'charger': icon.current = IconCharger; break; + case 'smoke': + icon.current = IconSmoke; + break; } return ( diff --git a/src/components/RightBar/SmokeHandle/SmokeTrendChart/index.jsx b/src/components/RightBar/SmokeHandle/SmokeTrendChart/index.jsx index 9fc928e..b2f3e98 100644 --- a/src/components/RightBar/SmokeHandle/SmokeTrendChart/index.jsx +++ b/src/components/RightBar/SmokeHandle/SmokeTrendChart/index.jsx @@ -8,7 +8,7 @@ import ReactECharts from 'echarts-for-react'; const SmokeTrendChart = (props) => { const options = { color: ['#FFD160', '#12FFF5', '#2760FF'], - grid: { top: 28, right: 12, bottom: 32, left: 48 }, + grid: { top: 38, right: 12, bottom: 20, left: 48 }, xAxis: { type: 'category', data: Array(7) @@ -34,6 +34,12 @@ const SmokeTrendChart = (props) => { }, }, yAxis: { + name: '单位m³/h', + nameTextStyle: { + color: '#fff', + fontSize: 10, + align: 'right', + }, type: 'value', axisLabel: { color: '#fff', @@ -72,6 +78,38 @@ const SmokeTrendChart = (props) => { }, // smooth: true, }, + { + data: Array(7) + .fill(1) + .map((_) => { + return randomInt(60, 100); + }), + type: 'line', + areaStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { offset: 0, color: '#12FFF540' }, + { offset: 0.5, color: '#12FFF520' }, + { offset: 1, color: '#12FFF510' }, + ]), + }, + // smooth: true, + }, + { + data: Array(7) + .fill(1) + .map((_) => { + return randomInt(60, 100); + }), + type: 'line', + areaStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { offset: 0, color: '#2760FF40' }, + { offset: 0.5, color: '#2760FF20' }, + { offset: 1, color: '#2760FF10' }, + ]), + }, + // smooth: true, + }, ], tooltip: { trigger: 'axis', @@ -98,7 +136,7 @@ const SmokeTrendChart = (props) => { -