Is it possible to change the color of a Column-Chart created with Chartkick ? I searched for it inside the Documentation but i could not find anything about it. Any Ideas?
Asked
Active
Viewed 4,051 times
3 Answers
6
For Google Charts, use the library option to change the color of the entire series.
<%= column_chart data, :library => {:colors => ["red"]} %>
There's not an easy way to change each bar in a single series at the moment.
https://developers.google.com/chart/interactive/docs/gallery/columnchart

Andrew Kane
- 3,200
- 19
- 40
1
I tried the above solutions they did not work. The color option for chartkick should be in the below format to work.
<%= column_chart @data, colors: [["#63b598", "#ce7d78", "#ea9e70", "#a48a9e", "#c6e1e8"]] %>

Vinyas Bj
- 123
- 6
0
I think it might work like this:
= column_chart(@data, library => { :series => { 0 => { color: "red" } }
Like this you can define that for each series.

tomr
- 1,134
- 2
- 10
- 25