score:1

Accepted answer
let xAxisValue = 'date';

in line 1 to make the codepen sample working.

And then

let x = d3.scaleBand()
.domain(dataToStack.map(function(d){
    let link = d[xAxisValue];                         
    return link;
    //return d.date;
}))
.rangeRound([0,width])
.padding(0.05);

It works when I modify it in your codepen sample.


More Query from same tag