Posts

Showing posts from November, 2012

Coloring individual columns of a column chart (Google Visualization)

Now before i get into the nuts and bolts of my problem. I must confess that i was quite skeptical about the google charts API, mainly because of using the mostly awesome Jfreecharts  in the past. However having used it for a bit now, i am warming up to the idea of it, because quite frankly it is much simpler to use. You are likely to have a "cool" looking chart with tooltips etc in a much shorter time when compared to JFreeCharts. Anyway so about my problem, recently i was asked to create a column chart such that each column is colored differently.  My data looked something like this    var  data  =  google . visualization . arrayToDataTable ( [      [ 'Year' ,  'Games Finished' ] ,      [ '2003' ,   12 ] ,      [ '2004' ,   6 ] ,      [ '2005' ,   15 ] ,    ] ) ; The problem with this was that each column in the column chart is the same...