实现效果:
<template>
<div id="ScatterChart" style="flex: 1; height: 300px; width: 614px; margin-left: 10px"></div>
</template>
<script>
import {
getPeopleLive } from '@/api/government';
export default {
data() {
return {
qCateListName: [],
qCateListValue: [],
qCateList: [],
};
},
mounted() {
this.getPeopleLive();
},
methods: {
setSymbolSize(size, max, min) {
const caSize = Math.round(100 - ((max - size) / max) * 80);
switch (size) {
case max:
return 80