I created a fiddle for a drilldown highchart here https://jsfiddle.net/osneaj/2/. I need to format the tooltip with correct percentage in both the main chart and the drilldown ones too. Can someone please tell me how to do it.
$(function () {
$('#drillDown').highcharts({
chart: {
type: 'column',
renderTo: 'drillDown'
},
title: {
text: 'Healthcare Operations'
},
subtitle: {
text: 'Facility Revenue'
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
format: '{point.name}: ${point.y}'
}
}
},
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: 'Facility',
colorByPoint: true,
data: [{
name: 'Taer Hospital System',
y: 1000000,
drilldown: 'Taer 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'
}]
}],
drilldown: {
series: [{
name: 'Taer Hospital System',
id: 'Taer Hospital System',
data: [
{
name: 'Intensive Care',
y: 500000,
drilldown: 'Taer Intensive Care Sub'
},
['Orthopaedics', 300000],
['Pediatrics', 200000],
['Inteal Medicine', 100000],
['Cancer Unit', 100000]
]
}, {
name: 'Wellstar Health',
id: 'Wellstar Health',
data: [
['Intensive Care', 100000],
['Orthopaedics', 100000],
['Pediatrics', 50000],
['Inteal Medicine', 25000],
['Cancer Unit', 25000]
]
}, {
name: 'Jacobs Medical Park',
id: 'Jacobs Medical Park',
data: [
['Intensive Care', 20000],
['Orthopaedics', 10000],
['Pediatrics', 4000],
['Inteal Medicine', 1500],
['Cancer Unit', 1500]
]
}, {
name: 'Blue Star',
id: 'Blue Star',
data: [
{
name: 'Intensive Care',
y: 500000,
drilldown: 'Blue Star Intensive Care Sub'
},
{
name: 'Orthopaedics',
y: 10000000,
drilldown: 'Blue Star Orthopaedics'
},
['Pediatrics', 1000000],
['Inteal Medicine', 500000],
['Cancer Unit', 500000]
]
}, {
name: 'Cigna',
id: 'Cigna',
data: [
['Intensive Care', 3000000],
['Orthopaedics', 8000000],
['Pediatrics', 1000000],
['Inteal Medicine', 500000],
['Cancer Unit', 500000]
]
},
{
name: 'Blue Cross',
id: 'Blue Cross',
data: [
['Intensive Care', 3000000],
['Orthopaedics', 8000000],
['Pediatrics', 1000000],
['Inteal Medicine', 500000],
['Cancer Unit', 500000]
]
},
{
id: 'Taer Intensive Care Sub',
data: [
['First Ward', 3000000],
['ICU 2', 8000000],
['ICU 3', 1000000],
['ICU 4', 500000],
['ICU 5', 500000]
]
},
{
id: 'Blue Star Intensive Care Sub',
data: [
['First Ward', 3000000],
['ICU 2', 8000000],
['ICU 3', 1000000],
['ICU 4', 500000],
['ICU 5', 500000]
]
},
{
id: 'Blue Star Orthopaedics',
data: [
['First Ward', 3000000],
['ICU 2', 8000000],
['ICU 3', 1000000],
['ICU 4', 500000],
['ICU 5', 500000]
]
}
]
}
});
});
Thanks
