2014-09-03 14 views
0

我使用chartkick在軌產生這樣的圖表:Chartkick /谷歌圖表只能用第一種顏色在陣列上條形圖

<% @graphs.each_with_index do |g, i| %> 
    <%= column_chart g, discrete: true, min: 0.0, max: 1.1, colors: ["pink", "blue", "red"], 
    library: {hAxis: {textStyle: {fontSize: 10}}} %> 
    <% end %> 

其中G是像一些數據:

[['test1', 0.1],['test2',0.4],['test3',07]] 

我的問題是,而不是前三列是粉紅色,藍色和紅色,他們都是粉紅色的!

有誰知道如何使酒吧不同的顏色?

編輯:

玩具例子:

<%= column_chart [['test1', 20], ['test2', 30],['test3', 30]], colors: ["pink", "red", "blue"] %> 

回答