Im using d3.js to make a heatmap. My data is an object out of which i have pulled out the maximum and minimum year. When i use d3.timeScale() to initialise my x axi
d3.timeScale()
In D3 scales, you have to pass an array to range. The API is clear:
range
If range is specified, sets the scale’s range to the specified array of values. (emphasis mine)
Therefore, it should be:
.range([0, WIDTH]);