Skip to content Skip to sidebar Skip to footer

D3.js Error Using Timescale (path Is NaN)

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 axis, im getting an

Solution 1:

In D3 scales, you have to pass an array to range. The API is clear:

If range is specified, sets the scale’s range to the specified array of values. (emphasis mine)

Therefore, it should be:

.range([0, WIDTH]);

Post a Comment for "D3.js Error Using Timescale (path Is NaN)"