Highcharts Demo

author(s): Torstein Hønsi

by hendrikdegraaf

HTML

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

<div id="container"></div>

CSS

#container {
    height: 400px;
    min-width: 310px;
    max-width: 800px;
    margin: 0 auto;
}

JavaScript

function onLoad() {
    this.renderer
        .text('Hello world', 40,100)
        .css({
            fontSize: 60
        })
        .add()
}

const chart = Highcharts.chart('container', {
    chart: {
    	  events: {
        	load: onLoad
        }
    },

    title: {
        text: 'Hello world'
    },

    subtitle: {
        text: 'Cross browser issue withh SVGRenderer'
    },

    series: [
        {
            data: [1, 2, 3, 4, 5]
        }
    ]
});