visionmedia / histogram

JavaScript canvas histogram component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

JavaScript canvas histogram component


Languages

Language:JavaScript 100.0%