Javascript examples for highcharts:Chart Tooltip
Create custom tooltip on a highcharts drilldown?
<html> <head> <title>Highcharts Demo</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> $(function () {// ww w.java 2s .c o m // Create the chart $('#container').highcharts({ chart: { type: 'column' }, title: { text: 'Basic drilldown' }, xAxis: { type: 'category' }, legend: { enabled: false }, plotOptions: { series: { borderWidth: 0, dataLabels: { enabled: true, } } }, series: [{ name: 'Things', colorByPoint: true, tooltip: { pointFormat: 'parent series' }, data: [{ name: 'Animals', y: 5, drilldown: 'animals' }, { name: 'Fruits', y: 2, drilldown: 'fruits' }, { name: 'Cars', y: 4, drilldown: 'cars' }] }], drilldown: { series: [{ tooltip: { pointFormat: 'first level series - animals' }, id: 'animals', data: [ ['Cats', 4], ['Dogs', 2], ['Cows', 1], ['Sheep', 2], ['Pigs', 1] ] }, { tooltip: { pointFormat: 'first level series - fruits' }, id: 'fruits', data: [ ['Apples', 4], ['Oranges', 2] ] }, { tooltip: { pointFormat: 'first level series - cars' }, id: 'cars', data: [ ['Toyota', 4], ['Opel', 2], ['Volkswagen', 2] ] }] } }) }); </script> </head> <body> <script src="https://code.highcharts.com/highcharts.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> </body> </html>