fill area only between two series in area chart - Javascript highcharts

Javascript examples for highcharts:Chart Series

Description

fill area only between two series in area chart

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> 
      <script src="https://code.highcharts.com/modules/exporting.js"></script> 
      <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div> 
      <script type="text/javascript">
Highcharts.chart('container', {
  chart: {/* ww  w  . ja v a  2s .  c o  m*/
    type: 'area'
  },
  title: {
    text: 'Area chart with negative values'
  },
  xAxis: {
    categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
  },
  credits: {
    enabled: false
  },
  plotOptions: {
    series: {
      stacking: 'normal'
    }
  },
  series: [{
    name: 'John',
    data: [5, 3, 4, 7, 2]
  }, {
    name: 'Jane',
    fillColor: 'transparent',
    data: [2, 2, 1, 2, 1]
  }]
});

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

Related Tutorials