2016-04-22 36 views
4

Google Line Chartの1つのセグメントだけを破線で表示することはできますか?このような(参照「と両方のデータポイントが一定である場合だけ2つのデータポイント間のセグメントが一定である」ためGoogle Line Chart:破線の部分

enter image description here

はそれを達成するが、少なくとも二つのセグメントを有することができるcertainty役割は、ありますhttps://developers.google.com/chart/interactive/docs/roles#what-roles-are-available

答えて

2

ござい方法があるが、正式なソリューション、hereは一例であることをハック以上である:

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] 
     ]); 

enter image description here