Google折线图填充数据线

Joh*_*all 5 google-visualization

我有这个谷歌折线图,但想要像面积图一样填充一行.我看了谷歌,似乎他们的语法与用于创建图表的代码非常不同 - 我根本就没有得到它.继承我的图表选项:

var l1=new google.visualization.LineChart($('l1'))
l1.draw(d,{
width:900
,height:280
,fontSize:11
,legend:{position:'right'}
,pointSize:2
,chartArea:{left:35,top:8,width:'80%',height:220}
,backgroundColor:"#DDDDDD"
,colors:["blue","green","yellow","orange","red"]
,hAxis:{textPosition:'out'
,slantedText:true},
series:{0:{color:'#BBBBBB',lineWidth:10},1:{color:'#CCCCCC',lineWidth:10},2:{color:'yellow'},3:{color:'orange'},4:{color:'red'}}
})
Run Code Online (Sandbox Code Playgroud)

Dar*_*ico 1

为什么不使用面积图而不是折线图?

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

  • 因为它不支持曲线 (5认同)