绘制气泡图就很简单了,D3提供了布局算法,只需要将数据输入进去,得到气泡的位置,再进行绘制就行了。
数据
{
"children": [{
"name": "D3.js",
"weight": 100
},
{
"name": "Echarts.js",
"weight": 77
},
{
"name": "JavaScript",
"weight": 70
},
{
"name": "C/C++",
"weight": 66
},
{
"name": "Java",
"weight": 66
},
{
"name": "PHP",
"weight": 56
},
{
"name": "Ruby",
"weight": 69
},
{
"name": "Python",
"weight": 73
},
{
"name": "Windows",