Skip to content

Latest commit

 

History

History
40 lines (20 loc) · 724 Bytes

Readme.md

File metadata and controls

40 lines (20 loc) · 724 Bytes

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