Highcharts Demo
author(s): Torstein Hønsi
by Bhutada
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: 'Gender By Distribution'
},
credits: {
enabled: false
},
xAxis: {
categories: ['2017', '2018', '2019', '2020']
},
yAxis: {
min: 0,
title: {
text: ''
},
stackLabels: {
enabled: false,
}
},
yAxis: [{
gridLineColor: '#ed7d31',
lineColor: '#F3F5F6',
minorGridLineColor: '#ed7d31',
tickColor: '#F3F5F6',
plotLines: [{
color: '#ed7d31'
}],
labels: {
format: '{value} %'
},
min: 0,
max: 60,
opposite: true
}],
tooltip: {
headerFormat: '<b>{point.x}</b><br/>',
pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
},
plotOptions: {
column: {
stacking: 'percent',
dataLabels: {
enabled: false,
}
}
},
series: [{
name: 'Male',
data: [5, 8, 4, 3 ]
}, {
name: 'Female',
data: [3, 4, 4, 2 ]
}]
});