$(document).ready(function() {
    var chart_options = {
    	chart: {
    		renderTo: 'serie',
    		defaultSeriesType: 'column'
    	},
    	title: {
    		text: 'Serie'
    	},
    	xAxis: {
			
    		title: {
    			text: 'Consecutivi'
    		},
    		lineColor: '#808080',
    		lineWidth: 1,
    		gridLineColor: '#dddddd',
    		allowDecimals: false,
    		labels: {
            	formatter: function() {
                	return this.value + 1;
            	}
        	}
    	},
    	yAxis: {
    		title: {
    			enabled: false,
    			text: ''
    		},
    		lineColor: '#808080',
    		lineWidth: 1,
    		labels: {}
    	},
    	tooltip: {
    		formatter: function() {
    			return ''+
    				this.y +'';
    		}
    	},
    	plotOptions: {
    		column: {
    			pointPadding: 0.2,
    			borderWidth: 0
    		}
    	},
    	legend: {
    		enabled: true,
    		layout: 'vertical',
            align: 'right',
            verticalAlign: 'top',
            x: -80,
            y: 80,
            floating: true,
            borderWidth: 1,
            backgroundColor: '#FFFFFF'
    	},
    	credits: {
    		enabled: false
    	},
        series: [{
    		name: 'serie1',
    		data: []
    
    	}, {
    		name: 'serie2',
    		data: []
    
    	}]
    };

    var urlo = $("#serie").attr("urlo");
    
    $.getJSON(urlo, function(results) {
		chart_options.series = results.series;
		chart_options.title.text = results.title;
		chart_options.legend = results.legend;
	
		var serie = new Highcharts.Chart(chart_options);

	});  
    
    
});
