JSFiddle - React, Tailwind, and code Playground

by navindian

HTML

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


<div id="container" style="height: 500px"></div>

JavaScript

$(function() {
    $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=usdeur.json&callback=?', function(data) {

        // Create the chart
        window.chart = new Highcharts.StockChart({
            chart : {
                renderTo : 'container'
            },

            rangeSelector : {
                selected : 1
            },

            title : {
                text : 'USD to EUR exchange rate'
            },

            yAxis : {
                title : {
                    text : 'Exchange rate'
                }
            },

            series : [{
                name : 'USD to EUR',
                data : data,
                id : 'dataseries',
                tooltip : {
                    valueDecimals: 4
                }
            }, {
                type : 'flags',
                data : [{
                    x : Date.UTC(2011, 1, 14),
                    title : 'A',
                    text : 'Shape: "squarepin"'
                }, {
                    x : Date.UTC(2011, 3, 28),
                    title : 'A',
                    text : 'Shape: "squarepin"'
                }],
                onSeries : 'dataseries',
                shape : 'url(http://www.highcharts.com/demo/gfx/sun.png)',
                width : 16
            }, {
                type : 'flags',
                data : [{
                    x : Date.UTC(2011, 2, 1),
                    title : 'B',
                    text : 'Shape: "circlepin"'
                }, {
                    x : Date.UTC(2011, 3, 1),
                    title : 'B',
                    text : 'Shape: "circlepin"'
                }],
                shape : 'circlepin',
                width : 16
            }, {
                type : 'flags',
                data : [{
                    x : Date.UTC(2011, 2, 10),
                    title : 'C',
                    text : 'Shape: "flag"'
                }, {
                    x : Date.UTC(2011, 3,...