Accepted answer

pass value like data array and loop it!

d3.json("./data/new.json", function(error,data1){

for(r in data1){

like this you can implement this


Convert this json to two list using javascript or jquery whichever you like

t1 = [207, 45]

t2 = [20.07, 0.04]

now replace data (d) in the with t1 for graph 1 and with t2 for graph 2 it will work for sure


you can use loop for this

$.getJSON("./data/new.json", function(data){

for(i in data){


data1 = data[i]; after looping using your example this way link

Related Query

More Query from same tag