JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Rise of the Smartphone'
},
subtitle: {
text: 'Devices Used by Tanzanian Visitors to TETEA Websites'
},
xAxis: {
gridLineWidth: 1,
categories: ['2013-11', '2013-12', '2014-01', '2014-02', '2014-03', '2014-04', '2014-05', '2014-06', '2014-07', '2014-08', '2014-09', '2014-10', '2014-11', '2014-12', '2015-01', '2015-02*']
},
yAxis: {
min: 0,
title: {
text: 'Percent of Users'
}
},
tooltip: {
pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b> ({point.percentage:.0f}%)<br/>',
shared: true
},
plotOptions: {
column: {
stacking: 'percent'
}
},
series: [{
name: 'Desktop',
data: [172, 911, 5049, 5582, 2, 952, 2088, 2739, 4841, 1783, 1904, 1859, 4187, 2556, 8181, 10322]
}, {
name: 'Tablet',
data: [1, 10, 47, 64, 0, 8, 24, 27, 68, 19, 29, 40, 121, 87, 276, 233]
}, {
name: 'Mobile',
data: [31, 220, 1498, 2433, 1, 213, 578, 855, 2395, 607, 865, 855, 6225, 2372, 9227,
9842]
}]
});
});