Highcharts Demo
author(s):
Torstein Hønsi
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/drilldown.js"></script>
<div id="drillDown" style="width:100%;height:400px"></div>
<div id="drillDown1" style="width:100%;height:400px"></div>
JavaScript
$(function() {
var mainData = [{
name: 'Tanner Hospital System',
y: 1000000,
drilldown: 'Tanner Hospital System'
}, {
name: 'Wellstar Health',
y: 2500000,
drilldown: 'Wellstar Health'
}, {
name: 'Jacobs Medical Park',
y: 370000,
drilldown: 'Jacobs Medical Park'
}, {
name: 'Blue Star',
y: 4200000,
drilldown: 'Blue Star'
}, {
name: 'Cigna',
y: 2700000,
drilldown: 'Cigna'
}, {
name: 'Blue Cross',
y: 3900000,
drilldown: 'Blue Cross'
}];
var options = {
chart: {
renderTo: 'drillDown'
},
title: {
text: 'Healthcare Operations'
},
subtitle: {
text: 'Facility Revenue'
},
plotOptions: {
pie: {
dataLabels: {
enabled: true,
formatter: function() {
return '<b>' + this.key + '</b>: ' + intToString(this.y);
}
}
},
column: {
dataLabels: {
enabled: true,
formatter: function() {
var ret = '',
multi,
axis = this.series.yAxis,
numericSymbols = ['k', 'M', 'G', 'T', 'P', 'E'],
i = numericSymbols.length;
while (i-- && ret === '') {
multi = Math.pow(1000, i + 1);
if (axis.tickInterval >= multi && numericSymbols[i] !== null) {
ret = Highcharts.numberFormat(this.y / multi, -1) + numericSymbols[i];
}
}
return this.point.name + ":" + ret;
}
}
}
},
tooltip: {
//headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
headerFormat: '<span style="font-size:11px"></span>',
formatter: function() {
if (this.series.name == "Facility") {
var pcnt = (this.y / mainDataSum)
}
if (this.series.name == "Tanner Hospital System") {
var pcnt = (this.y / tannerHospitalDataSum)
}
if...