Set tooltip to crosshairs and shared

Description

The following code shows how to set tooltip to crosshairs and shared.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
$(function () {<!--from   w w  w  .ja v  a 2  s.  com-->
    $('#container').highcharts({
        chart: {
            type: 'area'
        },
        tooltip: {
           crosshairs: true,
           shared: true
        },
        series: [{
            name: 'A',
            data: [5, 3, 4, 7, 2]
        }, {
            name: 'B',
            data: [2, -2, -3, 2, 1]
        }, {
            name: 'C',
            data: [3, 4, 4, -2, 5]
        }]

    });    
});
</script>
</head>
<body>
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; height: 400px; max-width: 800px; margin: 0 auto"></div>

</body>
</html>

Click to view the demo





















Home »
  highcharts »
    Chart Setup »




3D Chart
Chart
Chart Style
Data
Event
Export
Legend
Title
Tooltip
Tooltip Format