Google Charts API: Using a fixed set of datapoints

大城市里の小女人 提交于 2019-12-23 14:38:12

问题


Is there a way to set the length of a data series using Google Charts i.e. send in 40 values and stipulate that the range is 256 values and have it plot the 40 values and leave room for (256-40) more values in the chart?

To get the idea, think of a finance intraday chart, at 10 o clock it displays only the data that is gotten by that time, but the chart still shows all of the space that eventually WILL get filled (when the trading day is over, that is).

I'd say to get a live preview of the effect to be accomplished here, see finance.google.com and look at the chart before 4 o'clock this afternoon and you'll see that it is not completely filled, although the chart is always the same "size" in terms of datarange.


回答1:


Fill the rest of the values using the _ (or __ depending on your encoding) special value to indicate "no data".

See the documentation for simple encoding for additional information on this. Text encoding uses negative values to indicate missing data.



来源:https://stackoverflow.com/questions/1488724/google-charts-api-using-a-fixed-set-of-datapoints

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