Highcharts Stock Demo

author(s): Torstein Hønsi

by Fusher

HTML

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

<script src="http://code.highcharts.com/stock/highstock.js"></script>
<script src="http://code.highcharts.com/stock/modules/exporting.js"></script>
<script type="text/javascript" src="http://www.highcharts.com/samples/data/usdeur.js"></script>

JavaScript

$(function() {
    var chart = new Highcharts.StockChart({

        chart: {
            renderTo: 'container'
        },

        xAxis: {
            labels: {
                formatter: function() {
                    return this.value;
                }
            },
            tickInterval: 2
        },

        rangeSelector: {
            selected: 1
        },

        series: [{
            name: 'USD to EUR',
            pointStart: -24,
            pointInterval: 1,
            data: [1, 2, 3, 4, 5, 1, 2, 4, 1, 5, 6, 1, 2]
        }]
    });
});