前台代码
<!-- 嵌套容器 -->
<el-container>
<!-- 内容 -->
<el-main>
<el-row>
<el-col :span="18" class="col3">
<div style="min-height: 300px;" ref="myEchart"></div>
</el-col>
</el-row>
</el-main>
</el-container>
<script>
import {
getData } from '@/api/dashboard' //数据获取
import Chart from 'echarts'
export default {
data () {
return {
chart: null,
option: {
title: {
x: 'center'