Highcharts Demo

author(s): Torstein Hønsi

by ismusidhu

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

JavaScript

Highcharts.chart('container', {
  chart: {
    renderTo: 'container',
    type: 'area'
  },
  plotOptions: {
    series: {
      stacking: 'normal',
      
    threshold: 0
    },
    area: {
    }
  },
  tooltip: {
    shared: true
  },
  title: {
    text: 'Area chart with negative values'
  },/* 
  xAxis: {
    categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
  },
  credits: {
    enabled: false
  }, */
  series: [{
  color: 'red',
    name: 'Jane',
    data: [
      [1, 2],
      [2, 4],
      [3, 0],
      [4, 0],
      [5, 3],
      [6, 2]
    ]
  },{
  	color: 'blue',
    name: 'John',
    data: [
      [1, 5],
      [2, 3],
      [3, 4],
      [4, 7],
      [5, 2],
      [6, 2]
    ]
  },  {
  	color: 'red',
    name: 'Jane1',
    stack: 'negative',
    data: [
      [3, -2],
      [4, -3],
    ]
  }]
});
/* 
, {
        name: 'Joe',
        data: [[1,5], [2,3], [3,4], [4, 7], [5,2]]
    } */