ChartWrapper:“无法读取未定义的属性'count'

时间:2013-02-05 16:31:16

标签: gwt google-visualization jsni

当我想使用Google Visualization API的ChartWrapper时,我遇到一个奇怪的问题,我使用smartgwt和JSNI方法将图表放入窗口,我使用普通图表成功(PieChart,LineChart ......)但是使用ChartWrapper我有一个我无法解决的错误:

"Cannot read property 'count' of undefined"

并且ChartWrapper中没有属性调用'count'

我使用了tutoriel的例子

google.load('visualization', '1');   // Don't need to specify chart libraries!
google.setOnLoadCallback(drawVisualization);
function drawVisualization() {
    var wrapper = new google.visualization.ChartWrapper({
      chartType: 'ColumnChart',
      dataTable: [['', 'Germany', 'USA', 'Brazil', 'Canada', 'France', 'RU'],
                  ['', 700, 300, 400, 500, 600, 800]],
      options: {'title': 'Countries'},
      containerId: 'vis_div'
    });
    wrapper.draw();
  }

我也试图绘制一个ChartEditor(我在官方页面上使用了一个简单的例子),但我也有同样的错误:

0 个答案:

没有答案