JSFiddle - React, Tailwind, and code Playground

by hfrntt

HTML

<script type="text/javascript" src="http://www.highcharts.com/js/testing-stock.js"></script>


<div id="container" style="height: 500px; min-width: 500px"></div>

JavaScript

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

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

            rangeSelector : {
                selected : 2
            },

            title : {
                text : 'AAPL Stock Price'
            },

            series : [{
                type : 'candlestick',
                pointWidth: 10,
                name : 'AAPL Stock Price',
                data : data,
                dataGrouping : {
                    units : [[
                        'week', // unit name
                        [1] // allowed multiples
                    ], [
                        'month', 
                        [1, 2, 3, 4, 6]
                    ]]
                }
            }]
        });
    });
});