based of this really nice example: pusher.com/dynamic-graphs-with-d3-js/
data generated in this format, looping over red, green, blue and incrementing the id:
render([{
id: 1,
color: 'red'
}, {
id: 2,
color: 'green'
}, {
id: 3,
color: 'blue'
}]);