score:1

Accepted answer

In Chrome your timeScale scale is incorrect, more specifically its domain is [NaN, NaN]. You are trying to instantiate date with dateString but that string is not in the right format - read more about Date.parse.

Compare the following code in Chrome and FF:

[new Date('2005,0,1'), new Date('2016,0,1')]

In FF that array can be parsed to date, in Chrome it contains invalid dates.

To sum up, you need to create a correct time scale, e.g. like this:

  var min = d3.min(data, function(d) {
    return (+d.Year)  + ',0,1'
  }).split(',')

  var max = d3.max(data, function(d) {
    return +d.Year  + ',0,1'
  }).split(',')

  timeScale = d3.scaleTime()
    .domain([new Date(min[0], min[1], min[2]), new Date(max[0], max[1], max[2])])
    .range([0, width])

example: https://jsfiddle.net/devmzgwj/


Related Query