【发布时间】:2012-02-29 05:44:03
【问题描述】:
我正在使用 Google 可视化 API。我想使用 ChartWrapper 方法。谁能给我一个使用 JSON 格式获取数据的非常简单的例子吗?
【问题讨论】:
标签: php mysql google-visualization
我正在使用 Google 可视化 API。我想使用 ChartWrapper 方法。谁能给我一个使用 JSON 格式获取数据的非常简单的例子吗?
【问题讨论】:
标签: php mysql google-visualization
// Create an empty ChartWrapper and set its properties
var chart1 = new google.visualization.ChartWrapper();
chart1.setChartType('Table');
chart1.setContainerId('chart1_div');
// To set a DataView for the ChartWrapper, use
// DataView.toJSON()function.
// There is a no need to set DataTable for the ChartWrapper.
chart1.setView(dataView1.toJSON());
【讨论】: