Histogram

by amrutaJgtp

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/histogram-bellcurve.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>

<figure class="highcharts-figure">
    <div id="container"></div>
   
</figure>

CSS

.highcharts-figure,
.highcharts-data-table table {
    min-width: 310px;
    max-width: 800px;
    margin: 1em auto;
}

.highcharts-data-table table {
    font-family: Verdana, sans-serif;
    border-collapse: collapse;
    border: 1px solid #ebebeb;
    margin: 10px auto;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.highcharts-data-table caption {
    padding: 1em 0;
    font-size: 1.2em;
    color: #555;
}

.highcharts-data-table th {
    font-weight: 600;
    padding: 0.5em;
}

.highcharts-data-table td,
.highcharts-data-table th,
.highcharts-data-table caption {
    padding: 0.5em;
}

.highcharts-data-table thead tr,
.highcharts-data-table tr:nth-child(even) {
    background: #f8f8f8;
}

.highcharts-data-table tr:hover {
    background: #f1f7ff;
}

.highcharts-description {
    margin: 0.3rem 10px;
}

JavaScript

const data = [
  78.33, 69.32, 84.33, 86.32, 83.33, 85.33, 86.66, 85.33, 84.96, 99.96, 85.95,
  83.97, 86.29, 79.96, 79.96, 79.96, 113.68, 79.68, 166.78, 85.67, 84.68, 75.68,
  80.96, 84.29, 84.29, 65.28, 113.29, 85.65, 64.32, 113.28, 85.29, 80.24, 85.29,
  112.96, 64.95, 119.29, 80.24, 84.99, 79, 63.65, 79.94, 81.66, 112.66, 112.29,
  64.29, 64.29, 97.64, 82.64, 112.29, 63.95, 80.96, 82.3, 78.3, 62.95, 66.65,
  63.66, 63.66, 66.65, 78.01, 80.66, 82.01, 82.01, 111.33, 80.33, 62.32, 63.32,
  73.33, 82.33, 63.32, 66.32, 110.96, 76.96, 78.25, 77.3, 78.25, 79.96, 77.02,
  77.02, 62.68, 74.68, 79.68, 79.68, 74.68, 74.33, 96.65, 79.33, 62.33, 80.68,
  76.68, 76.68, 170.45, 78.96, 80.31, 77.25, 78.96, 78.96, 61.96, 74.96, 78.96,
  109.01, 71.67, 61.66, 109.67, 95.01, 60.66, 71.67, 109.01, 99.34, 60.32,
  75.67, 74.32, 64.32, 64.32, 64.32, 74.32, 79.96, 69.97, 94.97, 93.96, 79.96,
  75.25, 73.96, 57.96, 108.01, 108.01, 72.66, 59.66, 72.66, 57.66, 126.67,
  73.63, 71.29, 62.28, 73.63, 71.29, 59.28, 62.28, 70.96, 71.96, 61.95, 68.96,
  70.96, 68.97, 71.96, 58.63, 58.63, 58.63, 70.64, 91.98, 58.62, 91.97, 99.34,
  91.67, 91.67, 68.33, 106.33, 68.33, 70.33, 69.65, 67.65, 106, 104.99, 196.59,
  104.99, 55.65, 119.3, 104.68, 67.34, 91.33, 104.68, 90.68, 71.33, 104.68,
  90.3, 66.96, 104.3, 104.3, 66.96, 66.96, 104.3, 90.02, 66.68, 66.68, 66.68,
  105.03, 91, 54.68, 105.03, 90.61, 59.28, 54.29, 54.29, 104.64, 104.29, 68.29,
  68.29, 62.96, 62.96, 97.96, 79.96, 75.95, 74.96, 53.96, 67.96, 103, 53.29,
  103.06, 53.71, 89.66, 116.62, 65.29, 96.62, 80.29, 65.29, 103.64, 86.95,
  52.96, 66.96, 102.96, 102.96, 53.95, 67.96, 52.96, 67.6, 74.6, 68.61, 67.61,
  64.62, 85.71, 66.72, 67.29, 102.64, 66.3, 87.64, 88.28, 87.96, 78.96, 100.96,
  114.92, 99.95, 88.62, 78.62, 66.62, 66.62, 100.96, 66.71, 102.06, 84.33,
  56.32, 73.32, 65.33, 67.33, 86.68, 59.96, 66.96, 104.96, 50.96, 115.96, 64.96,
  73.97, 62.65, 86.97, 100.65, 65.65, 175.82, 112.4, 72.32, 65.32, 100.33,
  65.32, 65.96, 89.97,...