JSFiddle - React, Tailwind, and code Playground
Applications/services used on a weekly basis among 55-75 year olds, 2012 vs 2017
by pepperdigital
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: 'bar'
},
credits: {
enabled: false
},
exporting: {
enabled: false
},
colors: ['#007680', '#00ABAB', '#046A38', '#0097A9', '#62B5E5',
'#00A3E0', '#0076A8', '#012169', '#2C5234', '#C4D600'],
title: {
text: ''
},
tooltip: {
formatter: function () {
return this.series.name +
'<br><b>' + this.y + '%</b>';
}
},
xAxis: {
categories: [
'Text messages (SMS)',
'Voice calls',
'MMS',
'Instant messages',
'Video calls',
'Voice over IP (VoIP) calls',
'Emails',
'Social networks',
'Read news',
'Navigation or maps'
]
},
yAxis: {
min: 0,
max: 90,
labels: {
format: '{value}%'
},
title: {
text: ''
}
},
legend: {
enabled: true
},
series: [
{
name: '2012',
data: [
80,
76,
13,
6,
1,
1,
15,
9,
9,
8
]
},
{
name: '2017',
data: [
79,
73,
18,
35,
8,
13,
47,
31,
28,
10
]
}
]
});