Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get the color value for a Google line chart?

It's possible to set the color values for a Google chart, but is it possible to get the preset color values for a chart? Is there an array that holds those values, that can be accessed?

like image 575
Nick Avatar asked Dec 15 '22 10:12

Nick


1 Answers

From this Google Groups Discussion the default color array is not documented and cannot be accessed. However, if you want the array of colors, Xavier Gumara posted it, as did asgallant:

{"#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac","#b77322","#16d620","#b91383","#f4359e","#9c5935","#a9c413","#2a778d","#668d1c","#bea413","#0c5922","#743411"}

Just an FYI, a large portion of these sorts of questions have been covered on the Google Groups by folks like asgallant, and it can be worthwhile to do a quick search to try to find them (quicker than waiting for me to do it!). The above answer was the first two results for 'google visualization default colors'.

like image 115
jmac Avatar answered Jan 24 '23 12:01

jmac