Highcharts Demo
author(s):
Sebastian Bochan
by Rogério Saraceni
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/pareto.js"></script>
<div id="container"></div>
CSS
#container {
max-width: 800px;
height: 400px;
margin: 1em auto;
}
JavaScript
Highcharts.chart('container', {
chart: {
renderTo: 'container',
type: 'column'
},
title: {
text: 'Restaurants Complaints'
},
xAxis: {
categories: ['Overpriced', 'Small portions', 'Wait time', 'Food is tasteless', 'No atmosphere', 'Not clean', 'Too noisy', 'Unfriendly staff']
},
yAxis: [{
title: {
text: ''
}
}, {
title: {
text: ''
},
minPadding: 0,
maxPadding: 0,
max: 100,
min: 0,
opposite: true,
labels: {
format: "{value}%"
}
}],
series: [{
type: 'pareto',
name: 'Pareto',
yAxis: 1,
zIndex: 10,
baseSeries: 1
}, {
name: 'Complaints',
type: 'column',
zIndex: 2,
data: [755, 222, 151, 86, 72, 51, 36, 10]
}]
});