问题
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?
回答1:
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
回答2:
I think it might work like this:
= column_chart(@data, library => { :series => { 0 => { color: "red" } }
Like this you can define that for each series.
来源:https://stackoverflow.com/questions/22179365/how-to-change-the-color-of-a-column-chart-created-with-chartkick