Google Charts API:使用一组固定的数据点 [英] Google Charts API: Using a fixed set of datapoints

查看:62
本文介绍了Google Charts API:使用一组固定的数据点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用Google图表设置数据系列的长度,即发送40个值,并规定范围是256个值,并绘制了40个值,并为(256-40)个更多值留出空间图表?

为了得到这个想法,想一想财务日内图表,在10点时它只显示当时获得的数据,但图表仍然显示所有最终将填满的空间(当交易日结束时)。



我会说要实时预览效果在这里完成后,请参阅finance.google.com并在今天下午4点之前查看图表,您会发现它并未完全填充,尽管图表在数据范围方面总是相同的大小。

解决方案

使用_(或__取决于您的编码)特殊值填充其余值,以指示无数据。



请参阅简单编码,以获得关于此的更多信息。文本编码使用负值来表示缺少的数据。


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.

解决方案

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.

这篇关于Google Charts API:使用一组固定的数据点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆