Highcharts Demo

author(s): Torstein Hønsi

by HemalathaThanigaivel

HTML

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>
<script src="https://code.highcharts.com/stock/modules/export-data.js"></script>

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

JavaScript

/* $.getJSON('https://www.highcharts.com/samples/data/aapl-c.json', function (data) { */
    // Create the chart
    Highcharts.stockChart('container', {


        rangeSelector: {
            selected: 1
        },

        title: {
            text: 'AAPL Stock Price'
        },
        xAxis: {
        		min: 1500903000000,
            max: 1500894437000,

            tickInterval: 60 * 1000,
            /* labels: {
              format: '{value:%e.%b}'
            }, */
            
            /* min: 0,
            step: 2,
            max: 11,
            startOnTick: true,
            endOnTick: true,
            minRange : 300000,
                        tickInterval : 60 * 1000 */
        },
        series: [{
            name: 'AAPL',
            data: [100,46,24, 76, 78, 13, 68, 09, 45, 65, 97, 82],
            /* data: [
            [
                1500903000000,
                152.09
            ],
            [
                1500989400000,
                152.74
            ],
            [
                1501075800000,
                153.46
            ],
            [
                1501162200000,
                150.56
            ],
            [
                1501248600000,
                149.5
            ],
            [
                1501507800000,
                148.73
            ],
            [
                1501594200000,
                150.05
            ],
            [
                1501680600000,
                157.14
            ],
            [
                1501767000000,
                155.57
            ],
            [
                1501853400000,
                156.39
            ],
            [
                1502112600000,
                158.81
            ],
            [
                1502199000000,
                160.08
            ],
            [
                1502285400000,
                161.06
            ],
            [
                1502371800000,
                155.32
    ...