简体   繁体   中英

google charts with interpolated line charts

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) ? Thanks

For line charts you can use the interpolateNulls option mentioned here .

Setting it to true will make it interpolate the appropriate value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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