时间轴图 - 如何处理“时间间隙”?
我一直在使用 Google 图表 API 和带注释的时间线。画图就好了。我没有问题。
但是,我需要绘制股价的时间线图。您可能知道,股价仅在特定时间段内才有意义(例如上午 10 点到下午 4 点,即市场开盘和收盘时)。
如何更改 Google 时间线图表,以便 X 轴上的范围为上午 10 点至下午 4 点?目前,它只是在下午 4 点到第二天上午 10 点之间画了一条长长的恒定线,然后价格才开始再次波动。
伙计,我希望这是有道理的。 (谷歌财务图表似乎可以做到这一点)。
非常感谢任何能回答的人。你是冠军!
I've been working with Google chart API and annotated timeline. Drawing graphs is fine. I have no problem.
However, I need to draw a timeline graph for share prices. And as you may know, share prices are meaningful only between certain times (e.g. from 10AM to 4PM, when the market opens and closes).
How do I change the Google timeline graph so that on X-Axis, the range is from 10AM-4PM? Right now, it just draws a long constant line between 4PM till 10AM next day before prices start to move again.
Man, I hope that makes sens. (Google finance chart seems to do it).
Thank you SO much for whoever can answer. You are a CHAMPION!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用新的 AnnotationChart API,现在显然是可能的: https://code.google.com/p/google-visualization-api-issues/issues/detail?id=25#c43
您还可以使用其他类似的解决方案,例如dygraphs 。
It is apparently now possible if you use the new AnnotationChart API: https://code.google.com/p/google-visualization-api-issues/issues/detail?id=25#c43
You could also use other, similar solutions, like dygraphs for example.
我也有同样的问题。
经过一点努力后,我找到了解决方法。只需用 0(或空)值填充缺失值即可。它会完成这项工作
I had the same problem.
After giving it a little though I found workaround. Just fill the missing values with 0 (or null) values. It will do the job