简体   繁体   English

带有内插折线图的谷歌图表

[英]google charts with interpolated line charts

https://google-developers.appspot.com/chart/interactive/docs/gallery/linechart https://google-developers.appspot.com/chart/interactive/docs/gallery/linechart

I am using google line charts show above, I want to have multiple lines but one line might have data on a time that the other data doesn't.我正在使用上面显示的谷歌折线图,我想要有多条线,但一条线可能在某个时间有数据,而另一条数据没有。

So, basically is there an option that would let me do something like..所以,基本上有一个选项可以让我做类似的事情......

data.addRows([
      ['2004', 1000, 400],
      ['2005', null, 460],
      ['2006',  860, null],
      ['2007', 1030, 540]
]);

and have a line that goes through (2004, 1000) and (2005, 860) instead of (2004, 1000) to (2005, 0) to (2006, 860) ?并有一条线穿过(2004, 1000)(2005, 860)而不是(2004, 1000)(2005, 0)(2006, 860) Thanks谢谢

For line charts you can use the interpolateNulls option mentioned here .对于折线图,您可以使用此处提到的 interpolateNulls 选项。

Setting it to true will make it interpolate the appropriate value.将其设置为 true 将使其插入适当的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM