JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
<title>Highcharts</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/data.js"></script>
<script src="http://github.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/drilldown.js"></script>
<script src="highcharts.js" type="text/javascript"></script>
<!--Black theme
<script src="black-theme.js" type="text/javascript"></script>
-->
</head>
<body>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
</body>
</html>
JavaScript
$(function () {
// Create the chart
$('#container').highcharts({
chart: {
type: 'column',
events: {
drilldown: function (e) {
if (!e.seriesOptions && e.point.selected) {
var chart = this,
points = chart.getSelectedPoints(),
drilldowns = {
'Animals': {
name: 'Animals',
data: [
['Cows', 2],
['Sheep', 3]
]
},
'Fruits': {
name: 'Fruits',
data: [
['Apples', 5],
['Oranges', 7],
['Bananas', 2]
]
},
'Cars': {
name: 'Cars',
data: [
['Toyota', 1],
['Volkswagen', 2],
['Opel', 5]
]
}
};
Highcharts.each(points, function (p) {
chart.addSingleSeriesAsDrilldown(p, drilldowns[p.name]);
});
chart.applyDrilldown();
}
},
drillup: function (e) {
var chart = this,
points = [];
...