D3.js binding an object to data and appending for each key
- by frshca
I'm a D3.js newbie and I'm learning how to play around with data.
Let's say I have an object with names as keys, and each key has an array of numbers like this:
var userdata = {
'John' : [0, 1, 3, 9, 8, 7],
'Harry': [0, 10, 7, 1, 1, 11],
'Steve': [3, 1, 4, 4, 4, 17],
'Adam' : [4, 77, 2, 13, 11, 13]
};
For each user, I would like…