Originariamente inviato da Marcolino21
Ragazzi scusate se insisto, ma in Javascript come faccio a fare un ciclo dentro [ ] per passare l'array con le date ? (prima gestivo all'interno in PHP ecco il codice :
facendo in questo modo ovviamente mi prende l'array dataEstr[0] e dataEstr[1] pertanto devo sostituirlo con ciclo, ma secondo sono poco esperto, ho difficoltà nell'impostazione.codice:... var dati = contenuto; var newValue = dati.split(" "); var dateEstr = new Array(); var Val = new Array(); var i=0; var h = 0; for(var j=0;j<newValue.length;j++) { var newString = newValue[j].split("="); dateEstr[i] = newString[0]; Val[i] = parseInt(newString[1]); i++; } $(document).ready(function() { chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'column', margin: [ 50, 50, 100, 80] }, title: { text: 'test0' }, xAxis: { categories: [dataEstr[0],dataEstr[1]... ], labels: { rotation: -45, align: 'right', style: { .....
Grazie