$(function() { jQuery.getJSON('http://bourse.latribune.fr/bourse/www/chartJson.php?ID_NOTATION=8381868', function(data) { var line = [], volume = [], data = data.pos dataLength = data.length; for (i = 0; i < dataLength; i++) { date = data[i][0]*1000; line.push([ date, // the date //data[i][1], // open // data[i][2], // high // data[i][3], // low data[i][4] // close ]); vol = data[i][5] ; volume.push([ date, // the date vol // the volume ]) } // set the allowed units for data grouping var groupingUnits = [[ 'week', // unit name [1] // allowed multiples ], [ 'month', [1,2,3,5,4,6] ]]; Highcharts.setOptions({ lang: { months: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'], weekdays: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'], shortMonths : ['Jan', 'Fév', 'Mar', 'Avr', 'Mai', 'Jun', 'Jul', 'Aoû', 'Sep', 'Oct', 'Nov', 'Déc'], rangeSelectorZoom: 'Période', decimalPoint: ",", thousandsSep: " " } }); // create the chart chart = new Highcharts.StockChart({ chart: { renderTo: 'container', alignTicks: false }, scrollbar : { enabled: true }, navigator : { enabled: true, height : 20 }, exporting : { enabled: false }, title: { text: '' }, rangeSelector: { inputEnabled : false, enabled: true, selected: 1, buttons: [{ type: 'day',count: 5,text: '5J' },{ type: 'month',count: 1,text: '1M' }, { type: 'month',count: 3,text: '3M' }, { type: 'month',count: 6,text: '6M' }, { type: 'ytd',text: '1erJ' }, { type: 'year',count: 1,text: '1A' },{ type: 'year',count: 3,text: '3A' }, { type: 'year',count:5,text: '5A' }, { type: 'all',text: 'All' }] }, xAxis: [{ maxZoom: 14 * 24 * 3600000 //offset : 0, }], credits:{ enabled: false }, yAxis: { title: {text: ''}, height: 150 }, series: [{ name: 'Cours ', data: line, type: 'area', threshold : null, //type: 'areaspline', fillOpacity : .1, tooltip: { yDecimals: 2 }, dataGrouping: { units: groupingUnits } }] }) }); });