我是新來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