我是新来d3.js和目前正在交互式气泡图上修改我的need.The气泡图我的工作是低于只选择一个JSON对象D3
http://sunsp.net/demo/BubbleMenu/
来源代码和JSON文件
http://sunsp.net/code/bubbleMenu.html
http://sunsp.net/code/main_bubble_json.html
在这段代码中,我想SE只有名字只有2个泡泡。At Atlas和Aglab只显示那两个,而不是全部4.我该怎么做?
我试过下面选择一个在一段时间,但力的工作。
var bubbleObj = svg.selectAll(".topBubble")
.data(root.children[0])
.enter().append("g")
.attr("id", function(d,i) {return "topBubbleAndText_" + i});
console.log(bubbleObj);//bubble obj is null
// nTop = root.children.length;
nTop = 1;
你能告诉我如何使用JSON使用..因为我无法适应这个在我的代码的任何地方 – TheLion
对不起,我不能,你应该努力一点,看看你能否得到它。 – sbecker
找到了..谢谢 – TheLion