import React, { Component, PropTypes } from 'react';
import { BarCharts } from 'amos-core';
import { cpuDataOption } from './cpuDataOption';
/**
 * cpu 使用率
 */
class CpuUsageRate extends Component {
  constructor(props) {
    super(props);

  }

  /**
   *渲染图表
   */
  getOption = () => {
    return cpuDataOption;
  }

  render() {
    const chartStyle = { width: '400px', height: '70px' }
    return (
      <div className="pams-table-equipResource-canvas"  style={{ width: '100%',height: '100%' }}>
        <BarCharts
          barOps={this.getOption()}
          chartStyle={chartStyle}
        />
      </div>
    );
  }
}

CpuUsageRate.propTypes = {
};

CpuUsageRate.defaultProps = {
  chartStyle: { width: '100%', height: '100%' },
  chartData: []
};

export default CpuUsageRate;
