Skip to content

chartjs-chart-histogramHistograms for Chart.js

Give it raw values. It picks the bins, counts them, and draws each bar on its true bin edges on a numeric axis.

A first chart ​

js
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}]
  }
});

Released under the MIT License.