x Axis functions for getting date on bottom of chart
Mon Apr 26 2021 20:44:58 GMT+0000 (UTC)
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))
content_copyCOPY
Comments