This commit is contained in:
lb
2023-11-09 15:34:52 +08:00
parent b0431e4a33
commit b4eb30d76f
146 changed files with 2988 additions and 1328 deletions

View File

@@ -0,0 +1,37 @@
import GraphBase from '../../../Common/GraphBase';
import ReactECharts from 'echarts-for-react';
import getOptions from '../../../../hooks/getChartOption';
function ElecCost(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', 'short']}
>
{/* real echarts here */}
<ReactECharts
key={Math.random()}
option={getOptions([[112, 73, 79, 82, 30, 105, 87]], '氧气')}
style={{ height: '100%' }}
/>
{/* real table data here */}
</GraphBase>
);
}
export default ElecCost;