<template>
  <!--<div class="chartCont">-->
    <div style="width:90%">
      <IEcharts :option="option" style="width:100%;height: 238px"></IEcharts>
    </div>
  <!--</div>-->
</template>

<script>
export default {
  components: {},
  data() {
    return {
      option: {
        color: this.$echartColor,
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'cross',
            crossStyle: {
              color: '#999'
            }
          }
        },
        grid: {
          left: '3%',
          right: '4%',
          bottom: '3%',
          containLabel: true,
          x: 130
        },
        xAxis: [
          {
            type: 'category',
            data: [],
            axisPointer: {
              type: ''
            },
            axisLine: {
              lineStyle: {
                color: 'gray'
              }
            },
            splitLine: { show: false }
          }
        ],
        yAxis: [
          {
            type: 'value',
            name: '检测量',
            min: 0,
            axisLabel: {
              formatter: '{value}'
            },
            axisLine: {
              lineStyle: {
                color: 'gray'
              }
            },
            splitLine: { show: false }
          }
        ],
        series: [
          {
            name: '检测量',
            type: 'bar',
            data: []
          }
        ]
      },

      year: ''
    }
  },
  methods: {
    _openBar: function(obj) {
      this.option.series[0].data = []
      this.option.xAxis[0].data = []
      this.option.xAxis[0].data = obj.mounth
      this.option.series[0].data = obj.num
    }
  }
}
</script>
