BarChart generator in node.js.
npm install d3node-barchart
const d3nBar = require('d3node-barchart');
const bar = d3nBar({ data, selector, container, style })
Check out the example for usage.
npm start
- Type:
Array
Data from file or web processed by d3 library.
- Type:
String
- Default:
'#chart'
DOM selector in container.
- Type:
String
- Default:
<div id="container"><h2>Bar Chart</h2><div id="chart"></div></div>
DOM contain the visualization result.
- Type:
String
- Default:
.bar{fill: steelblue;}
.bar:hover{fill: brown;}
.axis{font: 10px sans-serif;}
.axis path,.axis line{fill: none;stroke: #000;shape-rendering: crispEdges;}
.x.axis path{display: none;}
- Type:
Number
- Default:
960
- Type:
Number
- Default:
500
- Type:
Object
- Default without labels:
{ top: 20, right: 20, bottom: 30, left: 40 }
- Default with labels:
{ top: 20, right: 20, bottom: 40, left: 50 }
- Type:
String
- Default:
steelblue
- Type:
String
- Default:
brown
- Type:
Object
- Default:
{ xAxis: '', yAxis: '' }
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D