实现效果:
<template>
<div id="BusinessTop5Chart" style="flex: 1; height: 300px; width: 614px; margin-left: 10px"></div>
</template>
<script>
import {
getNoteMatters } from '@/api/government';
const colors = [
'rgba(248, 75, 110, 1)',
'rgba(239, 142, 47, 1)',
'rgba(234, 202, 4, 1)',
'rgba(79, 224, 255, 1)',
'rgba(106, 196, 255, 1)',
];
export default {
data() {
return {
list: [],
list1: [],
list2: [],
Top5ListName: [],
Top5ListValue:[]
};
},
mounted() {
this.getNoteMatters();
},
methods: {
initMap() {
var myChart = this.$echarts.init(document.getElementById('BusinessTop5Chart'));
const option = {
grid: {
top: 20,
bottom: 30,
left: 10,
right: 150,
containLabel: true,
},
tooltip: {
show: true,
trigger: 'axis',
axisPointer: {
type: 'shadow',
}