JavaScript canvas histogram component
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
History.md
Makefile
Readme.md
component.json
example.html
histogram.css
index.js

Readme.md

histogram

JavaScript histogram component for arbitrary data.

large histogram

medium histogram

Installation

$ component install visionmedia/histogram

API

Histogram()

Initialize a new histogram.

Histogram.add(data:Array, options:Object)

Add data set with options:

  • color bar color

Histogram.size(w:Number, h:Number)

Set size to w / h.

Histogram.bins(n:Number)

Set the total number of bins to n.

Histogram.render()

Render the histogram and return a canvas.

License

MIT