Newer
Older
smartwell_front / src / views / zhangqiu / components / chart.vue
liuyangyingjie on 16 Aug 2022 606 bytes feat(view): 新增章丘驾驶舱看板
<template>
  <div class="box">
    <div id="container"></div>
  </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>