A simple, light-weight charting library built on top of d3.js
. The only
dependency for this library is d3.js. Make sure you are using d3.js version 4+,
if you are adding dependency explicitly.
From Github
, you can clone this repository, and the can find the required
files under the folder build
.
For cloning the repository, via HTTPS
use,
git clone https://github.com/bharadhwajcn/cinch-charts.git
or using SSH
use,
git clone [email protected]:bharadhwajcn/cinch-charts.git
or you can download the zip file for the repository by clicking here.
You can easily install the package from Bower. Make sure that, you already have
bower
installed.
bower install cinch-charts
Let's see how to draw a simple bar chart using this library.
HTML
<div class="chart-container" id="first-container"> </div>
JavaScript
var element = document.querySelector('.chart-container');
var data = [ ['2014', 50], ['2015', 70], ['2016', 30], ['2017', 40] ];
var chart = new BarChart(element, data);
Output
Live Example
Here is the JSFiddle link for the same.