饼图使用(d3.layout.pie),我可以在折线图中使用什么?我有一个存储在服务器中的json文件数据。我尝试访问这些数据,但我不能。我找了一个类似的例子,我找到了一个饼图示例
var force = d3.layout.force()
.charge(-120)
.linkDistance(30)
.size([width, height]);
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
如何更改此功能或其他方式(如d3.layout.stack))以允许我的折线图代码访问数据并使用d3.js绘制我的折线图?我的json文件是一个嵌套文件:
{"Id":466,"Name":"korea","Occurrences":
[{"OccurrenceDate":"\/Date(1398207600000+0100)\/","OccurrenceFrequency":27},
{"OccurrenceDate":"\/Date(1398726000000+0100)\/","OccurrenceFrequency":1},
{"OccurrenceDate":"\/Date(1398898800000+0100)\/","OccurrenceFrequency":4},
{"OccurrenceDate":"\/Date(1399071600000+0100)\/","OccurrenceFrequency":303}]}