Bins you can trust
The sqrt, Sturges, Rice, Scott, Freedman-Diaconis, Doane and auto rules match numpy, checked against numpy's own output on 27 datasets. Or set a count, a width, or the edges yourself.
Give it raw values. It picks the bins, counts them, and draws each bar on its true bin edges on a numeric axis.
import {Chart, registerables} from 'chart.js';
import {HistogramController, HistogramElement} from 'chartjs-chart-histogram';
Chart.register(...registerables, HistogramController, HistogramElement);
new Chart(canvas, {
type: 'histogram',
data: {
datasets: [{label: 'Adults', data: heights}]
}
});