It is a common task to compare the distribution of 2 or several numeric variables. This double histogram efficiently compares 2 distributions. See many other examples in the histogram section of the gallery. Learn more about the theory of histogram in data-to-viz.com. This example works with d3.js v4
and v6
filter()
function to the data when calling the histogram
function.rect
calls.