Closed jamesleesaunders closed 7 years ago
Also see issue #49
var data2 = d3.nest()
.key(function(d) { return d.date; })
.entries(data)
.map(function(group) {
series = group.values[0];
return {
key: group['key'],
values: [
{key: "New York", value: series['New York']},
{key: "San Francisco", value: series['San Francisco']},
{key: "Austin", value: series['Austin']},
]
};
});
console.log(data2);
data3 = [ {key: "New York", values: []}, {key: "San Francisco", values: []}, {key: "Austin", values: []} ];
d3.map(data).values().forEach(function(d) {
data3[0].values.push({key: dateConvert(d.date), value: parseInt(d['New York'])});
data3[1].values.push({key: dateConvert(d.date), value: parseInt(d['San Francisco'])});
data3[2].values.push({key: dateConvert(d.date), value: parseInt(d['Austin'])});
});
console.log(data3);
Completed by 050231b0cf9ab23f126a7c9c59dd79bae7b9a978.
Add standard Line Chart to D3.EZ library. This will make it more if a complete library.
Also make so can be area chart also?