效果图
借助Echarts中提供的样例完成,官网样例可自行前往
官网链接放下面啦!!
使用版本
完整代码如下
<!-- d3js 气泡图 -->
<template>
<div id="bubble" style="width: 500px;height:500px"></div>
</template>
<script>
import * as echarts from 'echarts/core';
import {
DatasetComponent,
TooltipComponent,
VisualMapComponent
} from 'echarts/components';
import { CustomChart } from 'echarts/charts';
import { CanvasRenderer } from 'echarts/renderers';
echarts.use([
DatasetComponent,
TooltipComponent,
VisualMapComponent,
CustomChart,
CanvasRenderer
]);
import * as d3 from 'd3';
export default {
data() {
return {
option: {},
colorList: ['#5470c6', '#91cc75', '#fac858&#