Highcharts Demo
author(s): Torstein Hønsi
by suphalak_26
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; max-width: 800px; height: 400px; margin: 0 auto"></div>
JavaScript
Highcharts.chart('container', {
chart: {
type: 'bar',
width: 800,
height: 400
},
title: {
text: ''
},
xAxis: {
categories: ['<1', '1-3', '3-5', '5-10', '>10'],
title: {
text: 'Duration (Year)'
}
},
yAxis: {
min: 0,
title: {
text: 'Yeild',
align: 'middle'
},
labels: {
overflow: 'justify'
}
},
tooltip: {
valueSuffix: ' millions'
},
plotOptions: {
bar: {
dataLabels: {
enabled: true,
color: '#000000',
style: { fontFamily: 'Verdana, sans-serif', fontSize: '8px',fontWeight : 'normal' },
formatter: function() {
return Highcharts.numberFormat(this.y)+'%';
}
}
},
series: {
pointPadding: 0,
groupPadding: 0.07,
borderWidth: 0
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
y: 80,
floating: false,
itemStyle: {fontSize:'9px',font: 'Verdana, sans-serif',color: '#000000',fontWeight : 'normal'},
symbolHeight:10,
symbolRadius: 0,
},
series: [{
name: 'P-00001-Account-001-P-0001-AccountPF-001 : as of 28/02/2017',
data: [91838.90, 98140.55, 3952.58, 45579.76, 8138.20],
color : '#F99F6A'
}, {
name: 'P-00001-Account-001-P-0001-AccountPF-002 : as of 28/02/2017',
data: [72839.39, 20455.89, 2488.40, 19727.36, 68762.64],
color : '#F4D435'
}, {
name: 'P-00001-Account-001-P-0001-AccountPF-003 : as of 28/02/2017',
data: [34303.01, 32747.30, 38151.17, 83203.73,72356.24],
color : '#F5BB2C'
}, {
name:...