xuchang-new/src/components/Modules/EnergyCostAnalysis/WaterCost/index.jsx
2023-12-14 11:24:03 +08:00

45 lines
970 B
JavaScript

import GraphBase from '../../../Common/GraphBase';
import ReactECharts from 'echarts-for-react';
import getOptions from '../../../../hooks/getChartOption';
function WaterCost(props) {
function handleSwitch(v) {
// console.log('switched ', v);
}
function handleDateChange(v) {
// console.log('date ', v);
}
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(
[
[9, 119, 56, 80, 75, 145, 66],
[7, 100, 14, 54, 63, 62, 11],
[2, 19, 42, 26, 12, 83, 55],
],
'氧气',
)}
style={{ height: '100%' }}
/>
{/* real table data here */}
</GraphBase>
);
}
export default WaterCost;