Highcharts Stock Demo

author(s): Torstein Hønsi

HTML

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

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

JavaScript

var categories = [], i=0,
    data = [];

for(;i<1000; i++) {
    categories.push(i);
    data.push( Math.random() * 10|0 );
}


$(function() {
    window.chart = new Highcharts.StockChart({
        
        chart: {
            renderTo: 'container',
            type: 'column'
        },
         navigator: {
                    enabled: true,
                    xAxis: {
                        tickInterval: 100,
                         labels: {
                formatter: function(){
                    return categories[this.value];
                }
            }
                    }

                },
        xAxis: {
            maxZoom: 10,
            labels: {
                formatter: function(){
                    return categories[this.value];
                }
            }
        },
        rangeSelector: {
            enabled: false
        },
        series: [{
            data: data
        }]
    });
});