Highcharts Demo
author(s): Torstein Hønsi
by glam
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/data.js"></script>
<script src="https://code.highcharts.com/modules/drilldown.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
// Create the chart
Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: 'Browser market shares. January, 2018'
},
subtitle: {
text: 'Click the columns to view versions. Source: <a href="http://statcounter.com" target="_blank">statcounter.com</a>'
},
xAxis: {
type: 'category'
},
yAxis: {
title: {
text: 'Total percent market share'
}
},
legend: {
enabled: false
},
plotOptions: {
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
format: '{point.y:.1f}%'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}%</b> of total<br/>'
},
"series":[
{
"name":"Daily",
"colorByPoint":false,
"data":[
{
"name":"2018-10-16",
"y":null,
"drilldown":"2018-10-16"
},
{
"name":"2018-10-17",
"y":null,
"drilldown":"2018-10-17"
},
{
"name":"2018-10-18",
"y":null,
"drilldown":"2018-10-18"
},
{
"name":"2018-10-19",
"y":null,
"drilldown":"2018-10-19"
},
{
"name":"2018-10-20",
"y":null,
"drilldown":"2018-10-20"
},
{
"name":"2018-10-21",
"y":null,
"drilldown":"2018-10-21"
},
{
"name":"2018-10-22",
"y":1,
"drilldown":"2018-10-22"
},
{
"name":"2018-10-23",
"y":2,
...