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>

JavaScript

$(function () {
    $('#container').highcharts({

        xAxis: {
            labels: {
                formatter: function() {
                    return this.value;    
                }
            },
            tickPositioner: function(min,max){
                console.log(this);
                 return this.series[0].xData;   
            }
        },
        series: [{
            name: 'USD to EUR',
            data: [
                [1039.0, 1],
                [1039.18, 2],
                [1039.28, 3],
                [1039.38, 4],
                [1039.48, 5],
                [1039.58, 6],
                [1039.68, 4],
                [1039.78, 3],
                [1039.88, 5],
                [1039.89, 9],
                [1040.0, 0]
            ]
        }]
    });
});