Skip to content

visionmedia/histogram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Packages

No packages published