Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google line chart fill a data line

I have this google line chart but want to fill one line like an area chart. I looked on google and it seems their syntax for this is very different to the code used to create charts - i simply dont get it. Heres my chart options:

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'}}
})
like image 556
Johnny Darvall Avatar asked Nov 13 '22 08:11

Johnny Darvall


1 Answers

Why don't you use an Area chart instead of a Line chart?

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

like image 86
Darkaico Avatar answered Dec 15 '22 17:12

Darkaico