Mon Apr 26 2021 20:44:58 GMT+0000 (Coordinated Universal Time)
Saved by @stephanieraymos
if (xAttribute === "date") { const xScale = scaleOrdinal().domain(data.map(dateValue)); return xScale; } else { const xScale = scaleLinear() .domain(extent(data, yValue)) .range([innerHeight, 0]) .nice(); return xScale; } const xScale = scaleOrdinal() .domain(data.map(dateValue))
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments