Highcharts Stock Demo

author(s): Torstein Hønsi

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() {
	$('#container').highcharts('StockChart', {
	    
	    chart: {
	    },
	    
	    xAxis: {
	    	labels: {
	    		staggerLines: 1,
                formatter: function() {
	    			return this.value +' units'; 
	    		},
                style: {
	            color: '#6D869F',
                    fontSize :'15px'
                    }
	    	},            
	    	tickPixelInterval: 200
	    },
	    
	    rangeSelector: {
	    	selected: 1
	    },
	    
	    series: [{
	        name: 'USD to EUR',
	        data: usdeur,
            dataGrouping: {
                enabled: true,
                units: [[
                    'month',
                    [1]
                    ],[
                    'week',
                    [1]
                    ],
                       [
                    'day',
                    [1]
                    ]]
            }
	    }]
	});
});