<template>
<div id = "a" style="width:600px;height:600px"></div>
</template>
<script>
import axios from 'axios'
import echarts from '../public/static/lib/echarts.min.js'
export default {
data(){
return{
chartInstance: null,
}
},
mounted(){
this.initChart()
this.getData()
// this.updateChart()
},
methods:{
initChart(){
this.chartInstance = echarts.init(document.getElementById("a"))
},
async getData(){
const ret = await axios.post("/api/data",{"start":"202101","end":"202106" })
console.log(ret)