Newer
Older
smartwell_front / src / views / zhangqiu / components / chart.vue
Stephanie on 17 Aug 2022 592 bytes fix<*>: 修改首页屏相关效果
<template>
  <div class="box">
    <div id="container" />
  </div>
</template>

<script>
import { option2 } from '@/views/zhangqiu/js/data'
import Charts from '@jiaminghi/charts'
export default {
  name: 'Chart',
  data() {
    return {
      data: option2
    }
  },
  mounted() {
    this.chart()
  },
  methods: {
    chart() {
      const container = document.getElementById('container')
      const myChart = new Charts(container)
      myChart.setOption(this.data)
    }
  }
}
</script>

<style>
#container {
  /*width: 350px;*/
  height: 200px;
  /* background: #f1f1f1; */
}
</style>