-1

我把总和数据放在我的图表谷歌区域图代码谷歌图表中

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],

我有这张图片作为我的图表 在此处输入图像描述

4

1 回答 1

1

@Ti Amo Laky:你没有问问题,所以很难回答:-)。但我的假设是缺少第 1 点,并且在图表中间的步骤困扰着你。

您没有为数据定义标题。第一个数组必须是这样的:

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

您在第 28 点之后重复了数据:第 18 到 28 点以完全相同的值重复。如果删除那些重复的值,您将得到以下图片:

在此处输入图像描述

于 2013-12-11T12:01:31.277 回答