scotthmurray/d3-book

Chapter 16 parseTime => d3.timeParse()

Closed this issue · 1 comments

In Chapter 16, in data transform the following needs to be updated:

From:

dataset[i-3] = {
  date: parseTime(rows[i][0]) // make a new Data obj for each year + month
};

To:

dataset[i-3] = {
  date: d3.timeParse(rows[i][0]) // make a new Data obj for each year + month
};

ParseTime is defined in the top.

var parseTime = d3.timeParse("%Y-%m");