Highcharts Demo

author(s): Torstein Hønsi

by AbhishekRohan

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
</script>

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

JavaScript

Highcharts.chart('container', {
    chart: {
        type: 'areaspline'
    },
    title: {
        text: 'Average fruit consumption during one week'
    },
    legend: {
         enabled:true,
    },
    xAxis: {
      gridLineWidth: 1,
      opposite: true,
        categories: [
            '18Q1',
            '18Q2',	
            '18Q3',
            '18Q4',
            '19Q1',
            '19Q2',
        ],
       // top:-235,
        tickInterval: 0.999,
    },
    yAxis: {
     gridLineWidth: 0,
        title: {
            text: 'Fruit units'
        }
    },
    tooltip: {
        shared: true,
        valueSuffix: ' units'
    },
    credits: {
        enabled: false
    },
    plotOptions: {
    		    spline: { // has to say spline here
                dataLabels: {
                    enabled: true,
                     borderRadius: 20,
                },
                },
        areaspline: {
            fillOpacity: 0.3
        }
    },
    series: [{
        name: 'John',
           dataLabels: {
                enabled: true,
                borderRadius: 20,
                y: -40,
                shape: 'oval',
               // format:"",
                backgroundColor:"#999999",
                
            },
        data: [30,44,23,14, 51, 10, 30]
    }, {
        name: 'Jane',
        data: [18, 63, 0, 23, 33, 15,26]
    }]
});