我是D3js的新手。我在可摺疊樹中顯示json。樹顯示正常,但連接節點的線大多是直的。如何控制連接節點的弧的半徑?請讓我知道如何在d3js中做到這一點。D3 js可摺疊圖增加弧線曲線半徑
需要對D3的繪製JSON數據
var treeData = JSON.parse('{"name":"pradeep","age":40,
"children": [{
"name": "naveen",
"description": 20,
"children": [{
"name": "interest",
"description": "displays the hobbies list",
"hobby": "S",
"hobby_name": "singinh"
}, {
"name": "profession",
"description": "describes the profession",
"profession": "blogger",
"salary": 20000,
"children": [{
"name": "cars",
"description": "car collections",
"children": [{
"name": "car-collections",
"description": "collections of cars",
"car_name": "audi",
"car_number": "8080"
}]
}]
}]
}]
}');
在工作plunker鏈路連接 - Plunker
你是什麼意思的 「大多以直」 嗎?你是否想要增加「興趣」和「專業」之間的垂直分離,這是否是問題? –
@GerardoFurtado是的。哪個參數負責這個屬性。 – zilcuanu