实现效果:
<template>
<div id="PompanyChartChart" style="flex: 1; height: 260px; padding: 0 30px 0 0"></div>
</template>
<script>
import {
getProposedInvestments } from '@/api/government';
export default {
data() {
return {
proposedYearsList: [],
enterpriseNumber: [],
enterpriseMoney: [],
};
},
mounted() {
this.getProposedInvestments();
},
methods: {
initMap() {
var myChart = this.$echarts.init(document.getElementById('PompanyChartChart'));
const option = {
legend: {
top: 5,
right: 0,
textStyle: {
color: '#fff',
fontSize: 12,
fontFamily: 'TencentSans',
},
itemWidth: 15,
itemHeight: 1,
padding: [0, 10, 0, 0],
},
tooltip: {