无法使Google Visualization API正常运行。它抛出一个错误

时间:2012-07-26 00:55:21

标签: google-visualization

这是我的代码和我得到的错误:

var data = new google.visualization.DataTable();
data.addColumn('date', 'Date');
data.addColumn('number', 'Views');
data.addColumn('number', 'Winks');
data.addRows([
                  [new Date('2012-25-07'), 1, null],
                  [new Date('2012-23-07'), 1, null],
                  [new Date('2012-21-07'), 1, null],
                  [new Date('2012-19-07'), 1, null],
                  [new Date('2012-18-07'), 1, null],
                  [new Date('2012-17-07'), 1, null],
                  [new Date('2012-16-07'), 1, null],
                  [new Date('2012-15-07'), 1, null],
                  [new Date('2012-14-07'), 1, null],
                ]);

var formatter_short = new google.visualization.DateFormat({formatType: 'short'});
formatter_short.format(data, 0);

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

错误:解析时出现问题   d = “Mnull,162.5Lnull,101Lnull,101Lnull,101Lnull,101Lnull,101Lnull,101Lnull,101Lnull,101Lnull,101”

0 个答案:

没有答案