winston / google_visualr

A Ruby Gem for the Google Visualization API. Write Ruby code. Generate Javascript. Display a Google Chart.

Home Page:http://googlevisualr.heroku.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add different color on last column of the chart

preranalanjile opened this issue · comments

Hi,

I want to apply different color on last column of the chart.

I have 10 columns in chart, 9 columns should have one color and 10th column should have other color.

For example,

var data = GoogleVisualr::DataTable.new
data.new_column('string', 'Year' )
data.new_column('number', 'Sale' )

data_table.add_rows([
['2004', 1000],
['2005', 1170],
['2006', 660],
['2007', 1030]
]);

For 2004, 2005, 2006 columns, I want to show sales in "red" color and for 2007, sale should be in "black" color.

Does google_visualr have any option for this ?

Please tell me how to change the color of last column in the chart.

Thank you,

Prerana