Histogram Layout

Histogram Layout

API ReferenceLayoutsHistogram Layout

A histogram layout shows the distribution of data by grouping discrete data points into bins. See bl.ock 3048450 for example usage.

d3.layout.histogram()

Constructs a new histogram function with the default value accessor, range function, and bin function. By default, the histogram function returns frequencies. The returned layout object is both an object and a function. That is: you can call the layout like any other function, and the layout has additional methods that change its behavior. Like other classes in D3, layouts follow the method chaining pattern where setter methods return the layout itself, allowing multiple setters to be invoked