<template>
  <div>
    <el-col :span="6">
      <div id="artChart" :style="{width: '200px', height: '100px'}"></div>
    </el-col>
  </div>
</template>
<script>
export default {
  mounted () {
    this.drawLine()
  },
  methods: {
    drawLine () {
      // 基于准备好的dom，初始化echarts实例
      let myChart = this.$echarts.init(document.getElementById('artChart'))
      // 绘制图表
      myChart.setOption({
        xAxis: {
          type: 'category',
          show: false
        },
        yAxis: {
          type: 'value',
          show: false
        },
        series: [
          {
            data: [28, 85, 9, 41, 17, 99, 7],
            type: 'line'
          }
        ]
      })
    }
  }
}
</script>
