38 lines
839 B
React
38 lines
839 B
React
|
import GraphBase from '../../../公共组件/GraphBase';
|
||
|
import ReactECharts from 'echarts-for-react';
|
||
|
import getOptions from '../../../../hooks/getChartOption';
|
||
|
|
||
|
function NatGas(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([[91, 69, 5, 10, 21, 46, 24]], '氧气')}
|
||
|
style={{ height: '100%' }}
|
||
|
/>
|
||
|
{/* real table data here */}
|
||
|
</GraphBase>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
export default NatGas;
|