import React from 'react';
import { BarChart } from '../index';

export default () => {
  const category = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'];
  const dataSource = [
    {
      name: '小区-A栋',
      unit: 'm³',
      data: [120, 200, 150, 80, 70, 110, 130],
      stack: '分组A',
    },
    {
      name: '小区-B栋',
      unit: 'm³',
      data: [120, 200, 150, 80, 70, 110, 130],
      stack: '分组A',
    },
    {
      name: '商区',
      unit: 'm³',
      data: [1120, 1200, 1150, 180, 170, 1110, 1130],
      stack: '分组B',
    },
  ];

  return (
    <div style={{ height: 300 }}>
      <BarChart category={category} dataSource={dataSource} />
    </div>
  );
};
