JSFiddle - React, Tailwind, and code Playground

by mqchen

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>

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

JavaScript

$(function () {
    var chart;
    $(document).ready(function() {
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                type: 'area'
            },
            title: {
                text: ' '
            },
            xAxis: {
                categories: ["Mai 2012", "Jun 2012", "Jul 2012", "Aug 2012", "Sep 2012"],
                tickmarkPlacement: 'on',
                title: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: 'Risiko'
                },
                labels: {
                    formatter: function() {
                        return this.value;
                    }
                }
            },
            tooltip: {
                formatter: function() {
                    return ''+
                        this.x +': '+ Highcharts.numberFormat(this.y, 0, ',') +' RP';
                }
            },
            plotOptions: {
                area: {
                    stacking: 'normal',
                    lineColor: '#666666',
                    lineWidth: 1,
                    marker: {
                        lineWidth: 1,
                        lineColor: '#666666'
                    }
                }
            },
            
            series: [
                {
                    name: "Økonomi",
                    data: [12, 30, 0, 5, 9]
                },
                {
                    name: "Elevens rettssikkerhet",
                    data: [1, 3, 0, 9, 15]
                },
                {
                    name: "Utdannings kvalitet",
                    data: [0, 30, 30, 30, 43]
                }
            ]
        });
    });
    
});