xuchang-new/src/components/Modules/EnergyCostAnalysis/SO2/index.jsx

45 lines
966 B
React
Raw Normal View History

2023-11-09 15:34:52 +08:00
import GraphBase from '../../../Common/GraphBase';
2023-11-09 13:36:21 +08:00
import ReactECharts from 'echarts-for-react';
import getOptions from '../../../../hooks/getChartOption';
function SO2(props) {
function handleSwitch(v) {
2023-12-14 11:24:03 +08:00
// console.log('switched ', v);
2023-11-09 13:36:21 +08:00
}
function handleDateChange(v) {
2023-12-14 11:24:03 +08:00
// console.log('date ', v);
2023-11-09 13:36:21 +08:00
}
return (
<GraphBase
icon="battery"
title="二氧化硫"
desc="能耗趋势图"
switchOptions={true}
onSwitch={handleSwitch}
dateOptions={['日', '周', '月', '年']}
legend={['总量', '白班', '夜班']}
onDateChange={handleDateChange}
size={['long', 'middle']}
>
{/* real echarts here */}
<ReactECharts
key={Math.random()}
option={getOptions(
[
[132, 155, 140, 83, 180, 67, 136],
[83, 58, 60, 22, 80, 64, 43],
[49, 97, 80, 61, 100, 3, 93],
],
'氧气',
)}
style={{ height: '100%' }}
/>
{/* real table data here */}
</GraphBase>
);
}
export default SO2;