d3: Coloring Multiple Lines from Nested Data
- by diet_coke
I'm currently assembling some line graphs with circles at the datapoints from arrays of JSON objects formatted like so:
var data = [{
"name": "metric1",
"datapoints": [
[10.0, 1333519140],
[48.0, 1333519200]
]
}, {
"name": "metric2",
"datapoints": [
[48.0, 1333519200],
[12.0, 1333519260]
]
}]…