I\'m using chartckick in my RoR project to generate charts, which works quite nice. (along with Google Charts).
I\'ve created a column chart with only 2 bars
From @buren's comment on GitHub it seems that using a different JSON structure will invoke different colors on the column_cart.
I changed the output in the Helper:
def parse_gender_data(data)
gender_data = Hash.new
gender_data[:male] = data[1]
gender_data[:female] = data[2]
[{"name" => "Male","data" => {"Gender" => gender_data[:male]}},{"name" => "Female","data" => {"Gender" => gender_data[:female]}}]
end
And created the chartkick.rb config file (config/initializers/chartkick.rb), adding some colors:
Chartkick.options = {
colors: ["#63b598", "#ce7d78", "#ea9e70", "#a48a9e", "#c6e1e8"]
}
