Add different color on last column of the chart #42

Closed
preranalanjile opened this Issue Sep 18, 2012 · 1 comment

Comments

Projects
None yet
2 participants

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

Owner

winston commented Oct 15, 2012

Do take a look at DataTable's color formatters. Those should help you.

Thank you.

@winston winston closed this Oct 15, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment