Chartkick: data visualization made easy with Ruby

Bookmark and Share

Recently, I’ve been using Highcharts, Google charts and Chart Js for visualizing dynamic data in my projects. But it was difficult to integrate it with the rails application. However, for every problem in Ruby, there is a gem out there to save your day and Chartkick, a Ruby gem exclusively available for data visualization is truly a savior. Chartkick can work with Highcharts, Chart.js and Google charts to create dynamic and interactive charts that draw data from the Rails application. And the best part, you just need to write one single line of Ruby code. Isn’t that amazing and powerful!

Let’s begin with Installation

For installation, all you have to do is adding this line to your application’s Gemfile:

Then you have to choose your charting library.
In case, if more than one charting library is loaded, choose between them with the following code:

P.S:- highcharts is the default adapter is nothing else is defined.

Using Chartkick

Once it’s installed, you can start playing around with chartkick. For example:

In the above example, I have just shown you how we can make a line chart.Similarly, you can create Pie chart, Column chart, Bar chart, Area chart, Scatter chart, Geo charts, Timeline(Google …

Read More