<template>
  <v-chart
    style="width:100%;height:100%"
    autoresize
    :option="option"/>
</template>
<script>
export default {
  data () {
    return {
      option: {
        color: ['#0AA6EB', '#FE645F'],
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'shadow'
          }
        },
        legend: {
          data: ['实售金额', '实售张数'],
          orient: 'horizontal',
          right: '10%'
        },
        toolbox: {
          show: true,
          orient: 'vertical',
          left: 'right',
          top: 'center',
          feature: {
            mark: {show: true},
            dataView: {show: true, readOnly: false},
            magicType: {show: true, type: ['line', 'bar', 'stack', 'tiled']},
            restore: {show: true},
            saveAsImage: {show: true}
          }
        },
        calculable: true,
        xAxis: [
          {
            type: 'category',
            axisTick: {show: false},
            data: ['驴妈�?, '携程', '飞猪', '同城', '艺龙', '淘宝']
          }
        ],
        yAxis: [
          {
            type: 'value',
            scale: true,
            name: '实售金额',
            max: 500,
            min: 0,
            boundaryGap: [0.2, 0.2]
          },
          {
            type: 'value',
            scale: true,
            name: '实售金额',
            max: 500,
            min: 0,
            boundaryGap: [0.2, 0.2]
          }
        ],
        series: [
          {
            name: '实售金额',
            type: 'bar',
            barGap: 0,
            data: [320, 332, 301, 334, 390, 290]
          },
          {
            name: '实售张数',
            type: 'bar',
            data: [220, 182, 191, 234, 290, 200]
          }
        ]
      }
    }
  },
  mounted () {
  }
}

</script>
