如何用不同长度的线条(系列)创建Google Chart? [英] How to create Google Chart with lines (series) of different lengths?

查看:107
本文介绍了如何用不同长度的线条(系列)创建Google Chart?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建显示两行或更多行的Google折线图,并在每个系列中使用不同数量的数据点?

例如,我想要创建一个包含2行的图表,其中一行显示随时间推移的期望值值,另一行显示随时间推移的实际值值。日期范围和期望值是预先知道的,所以我可以完整地绘制它们,但实际值可能还不完全知道(例如,日期范围涵盖将来的某些日期)。

解决方案

我在这个SO问题。解决方案是使用_(或__,具体取决于数据值的编码)表示没有价值。例如,一个数据系列可能是 10,7,3,1 ,另一个可能是 10,6,_,_


How do I create a Google Line Chart that displays two or more lines, with a different number of data points in each series?

For instance, I want to create a chart with 2 lines, one showing the expected values over time and another showing the actual values over time. The date range and expected values are known in advance so I can fully graph them, but the actual values may not be fully known yet (e.g. the date range covers some dates in the future).

解决方案

I found the answer in this SO question. The solution is to use "_" (or "__", depending on the encoding of the data values) to indicate "no value".

For instance, one data series might be 10,7,3,1 and the other might be 10,6,_,_.

这篇关于如何用不同长度的线条(系列)创建Google Chart?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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