Javascript 谷歌折线图:虚线部分

Javascript 谷歌折线图:虚线部分,javascript,charts,google-visualization,Javascript,Charts,Google Visualization,是否可以将Google折线图的一段样式设置为虚线?像这样: 有一个确定性角色可以实现这一点,但至少有两个段,因为“两个数据点之间的段是确定的,当且仅当两个数据点都是确定的”(参见)有一种方法,但不仅仅是黑客,官方解决方案就是一个例子: data.addColumn({type:'boolean',role:'certainty'}); // certainty col. data.addRows([ [1, 41.8, true], [2,

是否可以将Google折线图的一段样式设置为虚线?像这样:


有一个
确定性
角色可以实现这一点,但至少有两个段,因为“两个数据点之间的段是确定的,当且仅当两个数据点都是确定的”(参见)

有一种方法,但不仅仅是黑客,官方解决方案就是一个例子:

 data.addColumn({type:'boolean',role:'certainty'}); // certainty col.

      data.addRows([
        [1,  41.8, true],
        [2,  32.4, true],//duplicate this
        [2,  32.4, false],
        [3,  25.7, true],
        [4,  10.5, true],
        [5,  10.4, true],
        [6,  7.7, true],
        [7,  9.6, true],
        [8,  10.6, true],
        [9,  14.8, true],
        [10, 11.6, true],
        [11, 4.7, true],
        [12, 5.2, true],
        [13, 3.6, true],
        [14, 3.4, true]
      ]);