Border is hidden on hover in column and pie charts - Javascript highcharts

Javascript examples for highcharts:Pie Chart

Description

Border is hidden on hover in column and pie charts

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <div id="container" style="height: 400px"></div> 
      <script type="text/javascript">
Highcharts.chart('container', {
  chart: {//from   ww  w  . ja v a  2  s  .  c  o m
    type: 'column'
  },
  colors: ['#7cb5ec', '#42c700', '#C72100'],
  xAxis: {
    categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
  },
  plotOptions: {
    series: {
      stacking: 'normal',
      events: {
        mouseOver: function() {
          this.update({
            zIndex: 1
          });
          this.group.attr({
            "clip-path": ""
          });
        }
      },
      states: {
        hover: {
          brightness: 0,
          borderColor: 'black',
        }
      }
    }
  },
  series: [{
    data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
  }, {
    data: [144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2]
  }, {
    data: [22.0, 29.9, 56.4, 33.3, 10.1, 10.5, 34.0, 54.4, 17.7, 41.0, 37.2, 23.2]
  }],
  tooltip: {
    pointFormat: '{series.name}: <b>{point.y}</b> ({point.percentage:.1f}%)<br/>'
  }
});

      </script>  
   </body>
</html>

Related Tutorials