2013-10-02 81 views
-1

我把和數據在我的圖表谷歌Areachart 代碼谷歌圖表谷歌圖表數據放在AreaChart

google.setOnLoadCallback(talk); 
    function talk() { 
    var data = google.visualization.arrayToDataTable([<?=$talks ?>]); 

     var options = { 
      title: 'Nb De J\'aime', 
      hAxis: {title: 'Jours', titleTextStyle: {color: '#333'}}, 
      vAxis: {minValue: 0}, 
      pointSize: 10 
     }; 

    var chart = new google.visualization.AreaChart(document.getElementById('parle')); 
    chart.draw(data, options); 

$talks=['01',422],['02',440],['03',477],['04',523],['05',565],['06',609],['07',651],['08',708],['09',747],['10',759],['11',793],['12',860],['13',975],['14',1118],['15',1317],['16',1441],['17',1529],['18',1686],['19',1765],['20',1879],['21',2122],['22',2245],['23',2329],['24',2719],['25',3600],['26',4068],['27',4747],['28',5479],['18',1686],['19',1765],['20',1879],['21',2122],['22',2245],['23',2329],['24',2719],['25',3600],['26',4068],['27',4747],['28',5479],['29',6082], 

和我有這個知情同意我的圖 enter image description here

+0

什麼是這裏的確切查詢? – Rndm

+0

結果被放入變量$ talks – Ryodo

+0

你的問題是什麼? – asgallant

回答

1

@Ti Amo Laky:你沒有問過問題,所以很難回答:-)。但我的假設是,第一點缺失,並在圖表中間步驟打擾你。

您沒有爲您的數據定義標頭。第一陣列是這樣的:

 ['Jours', 'Number'], ['01', 422],... 

您有重複數據點28後:18點到28重複完全相同的值。如果您刪除這些重複的值,你會得到如下圖:

enter image description here