Area Chart with overlapping series - Javascript highcharts

Javascript examples for highcharts:Chart Series

Description

Area Chart with overlapping series

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: {/* w w w .j av  a  2 s  . c o  m*/
        type: 'area'
    },
    title: {
        text: 'Historic and Estimated Worldwide Population Growth by Region'
    },
    subtitle: {
        text: 'Source: Wikipedia.org'
    },
    xAxis: {
        categories: ['1750', '1800', '1850', '1900', '1950', '1999', '2050'],
        tickmarkPlacement: 'on',
        title: {
            enabled: false
        }
    },
    yAxis: {
        title: {
            text: 'Billions'
        },
        labels: {
            formatter: function () {
                return this.value / 1000;
            }
        }
    },
    tooltip: {
        split: true,
        valueSuffix: ' millions'
    },
    plotOptions: {
        area: {
            stacking: 'normal',
            lineColor: '#666666',
            lineWidth: 1,
            marker: {
                lineWidth: 1,
                lineColor: '#666666'
            }
        }
    },
    series: [{
              name: 'Asia',
              data: [502, 635, 809, 947, null, null, null],
            stack: 0
          }, {
              name: 'Asia2',
              data: [null, null, null, 947, 800, 767, 1766],
            stack: 1
          }, {
              name: 'Europe',
              data: [163, 203, 276, 408, null, null, null],
            stack: 0
          }, {
              name: 'Europe2',
              data: [null, null, null, 408, 339, 818, 1201],
            stack: 1
          }]
});

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

Related Tutorials