Google Chart API:是否可能有不完整的图表?
我需要制作一个图表,显示本周的每周活动,并将一周中的每一天作为 X 轴上的一个点。示例:
这工作正常,但我遇到的问题是,如果今天是星期三,则星期四至星期六没有数据。目前,图表通过将线条发送回 0 来描述这一点。有没有办法让 Google Charts 停止在特定点绘制线条并将其他数据点留空?
我尝试忽略数据集中缺失的值,但这只会导致它在整个图表中延伸周日至周三。
I need to make a chart showing weekly activity for the current week, with each day of the week as a point on the X axis. Example:
This works fine, but the problem I'm having is that, if today were wednesday, there's no data for Thursday-Saturday. Currently the chart depicts this by sending the line back to 0. Is there any way to make Google Charts stop drawing the line at a specific point and leave the other data points empty?
I tried omitting the missing values from the dataset, but that just causes it to stretch Sunday-Wednesday across the entire graph.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须传递值
null
,这是 Javascript 表示nil
的方式。确保不包含引号。例如:
You have to pass the value
null
, which is Javascript's way of sayingnil
. Make sure you don't include quotation marks.For instance: