ruby-on-railschartkick

How to change the color of a Column-chart created with Chartkick?


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?


Solution

  • 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