英文:
Show missing data points as zero in time series Chart.JS
问题
我正在尝试使用Chart.js创建一条折线图,以显示按时间间隔(15分钟、1天和1个月)聚合的请求。某些时间间隔可能没有数据点。
目前,Chart.js绘制一条连接所有可用点的折线。我想将所有缺失的点绘制为零。这是否可能?
英文:
I am trying to create a line chart using Chart.js to show requests aggregated by time intervals (15 mins, 1 day and 1 month). There may not be data points for every interval.
Currently Chart.js plots a line joining all the available points. I want to plot all missing points as zero. Is it possible?
答案1
得分: 1
这个问题似乎与这个问题非常相似1。我认为你正在寻找的是一种称为spanGaps的东西。
英文:
This question seems very similar to this one over here. I think what you are looking for is something called spanGaps.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论