I want to create a timeseries by passing a dictionary in the function. The code from the examples is this:
d3.csv("data.csv", function(error, data) {
data.forEach(function(d) {
d.date = parseDate(d.date);
d.close = +d.close;
});
x.domain(d3.extent(data, function(d) { return d.date; }));
y.domain(d3.extent(data, function(d) { return d.close; }));
//etc...
What I'm trying to do is to convert this into a function which takes an object with date and close rows (data) and produces the chart from this, i.e.
function makeGraph(timeseriesdata){
// create chart above from data
// what format??
}