Highcharts Demo
author(s):
Torstein Hønsi
HTML
<script src="https://highcharts.github.io/pattern-fill/pattern-fill-v2.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://highcharts.github.io/pattern-fill/pattern-fill-v2.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: 'area'
},
title: {
text: 'Trailing Twelve Months New Business Growth - Expanded vs New Client'
},
xAxis: {
allowDecimals: true,
categories: ["Q4 '14",
"Q1 '15",
"Q2 '15",
"Q3 '15",
"Q4 '15",
"Q1 '16",
"Q2 '16",
"Q3 '16",
"Q4 '16",
"Q1 '17",
"Q2 '17",
"Q3 '17",
"Q4 '17"],
tickmarkPlacement: 'on',
labels: {
formatter: function () {
return this.value; // clean, unformatted number for year
}
}
},
yAxis: {
title: {
text: ''
},
},
tooltip: {
pointFormat: '{point.y}'
},
plotOptions: {
area: {
marker: {
enabled: true,
symbol: 'square',
radius: 2,
states: {
hover: {
enabled: true
}
}
}
}
},
series: [{
name: 'Expanded % Contribution to NB Growth',
data: [5.2, 6.3, 4.3, 1.9, 2.2, .5, 1.0, 2.9, 4.1, 7.3, 8.6, 9.9, 8.9],
color: 'url(#highcharts-default-pattern-0)'
}, {
name: 'New Client % Contribution to NB Growth',
data: [0.4, 2.3, 2.9, 1.2, 1.6, 0.7, 0.1, 1.0, 1.5, 2.2, 2.5, 2.2, 0.3],
color: "blue"
}]
});