我正在使用d3,我发现自己在制作带有x轴时间刻度的条形图时遇到问题,
, cast(
(combo.autotradercom_vdp + combo.carscom_vdp) / (0.5 * (((case when(extract(day from now() - 2)) < 3 then 1 else extract(day from now() - 2) end) + (
case
when combo.age > 0
then combo.age
else 1
end
)
)
- abs(
(
case
when(extract(day from now() - 2)) < 3
then 1
else extract(day from now() - 2)
end
)
- (
case
when combo.age > 0
then combo.age
else 1
end
)
)
)
)
as int
)
as "VDP/DL"
这是我正在使用的代码,问题是它总是留下一列(bar),例如,如果数据数组有120个项目,它打印119,当我把一个console.log输入到enter ()函数,我发现数据索引(在enter()调用中)从1开始而不是从0开始,这导致第一个位置的任何项目丢失,我不知道为什么这个发生。