سؤال

I'm using Google Charts to print out some cool charts. It works great in all my browsers. But the application that I'm building is a HbbTv app. In that enviroment Google Charts gives me an error when he tries to create a DataTable.

The google.visualization object exist, but arrayToTable doesn't exist... When I try to use DataTable() (creating a new empty DataTable) I get an error dat new google.visualization.DataTable() isn't a constructor...

Somebody known how this could happen?

Some additional info:

  • The google.visualisation is loaded (but it only count 3 elements instead of 51)
  • The HbbTv enviroment is a Opera 9.8

Thanks!

Code:

//My code for creating a data table from an array
var dataTable = google.visualization.arrayToDataTable(data, false);

// My code for creating a DataTable with a new instance
var dataTable = new google.visualization.DataTable();
dataTable.addColumn('string', 'Hour');
dataTable.addColumn('number', 'Amount');
dataTable.addColumn('number', 'Average');
dataTable.addRows(data);
هل كانت مفيدة؟

المحلول

The problem is fixed in the Google Visualization 1.1 (release canidate). So very soon it will be fixed in the production version.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top