更新时间:2023-11-23 23:30:40
let xAxisValue = 'date';
在第1行中使代码笔示例正常工作.
in line 1 to make the codepen sample working.
然后
let x = d3.scaleBand()
.domain(dataToStack.map(function(d){
let link = d[xAxisValue];
return link;
//return d.date;
}))
.rangeRound([0,width])
.padding(0.05);
当我在您的Codepen示例中对其进行修改时,它就可以工作.
It works when I modify it in your codepen sample.