JSFiddle - React, Tailwind, and code Playground

by Ivanho

HTML

<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>

JavaScript

var categories = [ '1850', '1900', '1950', '2000'];

var data = [{
            name: 'Line1',
            data: [116, 127, 131, 143]
        }, {
            name: 'Line2',
            data: [206, 217, 221, 233]
        }, {
            name: 'Line3',
            data: [303, 313, 326, 338]
     }]

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'area'
        },
        title: {
            text: 'Growth'
        },
        subtitle: {
            text: 'Source:'
        },
        xAxis: {
            categories: categories,
            tickmarkPlacement: 'on',
            title: {
                enabled: false
            }
        },
        yAxis: {
            title: {
                text: 'Billions'
            },
            labels: {
                formatter: function () {
                    return this.value / 1000;
                }
            }
        },
        tooltip: {
            shared: true,
            valueSuffix: ' millions'
        },
        plotOptions: {
            area: {
                stacking: 'normal',
                lineColor: '#666666',
                lineWidth: 1,
                marker: {
                    lineWidth: 1,
                    lineColor: '#666666'
                }
            }
        },
        series: data
    });
});