Highcharts Box Plot Example
HTML
<!--
<script src="https://code.highcharts.com/11.4.0/highcharts.js"></script>
<script src="https://code.highcharts.com/11.4.0/highcharts-more.js"></script>
-->
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<figure class="highcharts-figure">
<div id="container"></div>
<p class="highcharts-description">
Chart showing the use of box plots with outliers. The chart makes use
of a plot line to show the theoretical mean value across the y-axis.
</p>
</figure>
CSS
#container {
height: 400px;
}
.highcharts-figure,
.highcharts-data-table table {
min-width: 310px;
max-width: 700px;
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;
}
JavaScript
Highcharts.chart('container', {
"chart": {
"zoomType": "xy",
"width": 620,
"height": 480,
"backgroundColor": "#F2F2F2",
"type": "boxplot"
},
"xAxis": {
"title": {
"text": ""
},
"type": "category",
"plotBands": []
},
"yAxis": {
"title": {
"text": "Throughput"
},
"type": "linear",
"plotBands": []
},
"series": [{
"type": "boxplot",
"name": "series1",
"data": [{
"name": "Summarized",
"low": 194.0,
"q1": 205.52,
"median": 207.36,
"q3": 209.08,
"high": 317.58
}]
}, {
"type": "boxplot",
"name": "series2",
"data": [{
"name": "Summarized",
"low": 195.64,
"q1": 204.16,
"median": 205.72,
"q3": 207.48,
"high": 275.4
}]
}]
});