Google Visualization Annotated Time Line, removing data points

大兔子大兔子 提交于 2019-12-03 09:14:07

you can remove the allow redraw flag. In that case you have to put the data points manually in your data table

  1. The latest date of the actual whole data
  2. The most outdated date in the actual whole data.

this will retain your zooming operation. I think you have already seen removing the allowRedraw flag, works but with a small problem, flickering the whole chart.

It seems to me that the best solution would be to draw every nth data point, depending on your level of zoom. On the Google Finance graph(s), the zoom levels are pre-determined at the top: 1m, 5m, 1h, 1 day, 5 days, etc. It seems evident that this is exactly what Google is doing. At the max view level, they're plotting points that fall on the month. If you're polling 1000 times a day (with each poll generating a single point), then you'd be taking every 30,000th point (the fist point being the very first one of the month, and the 30,000th one being the last point).

Each of these zoom levels would implement a different plot of the data points. Each point should have a time stamp with accuracy to the second, so you'll easily be able to scale the plot based on the level of detail.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!