从融合表API高级可视化示例代码中给出的示例中,我设法得出了一个地图和图例。但是,柱形图未显示。 “无法解析查询”是正在显示的错误。可能是什么问题?
这是我的柱形图代码。
function drawVisualization(County) {
google.visualization.drawChart({
containerId: "visualization",
dataSourceUrl: "http://www.google.com/fusiontables/gvizdata?tq=",
query: "SELECT Environment,'BoysPupils','GirlsPupils','FemaleTeachers','MaleTeachers','BoardingPupils' " +
"FROM 1eC4sIAgVXfFj01mOM2cDiyW2nly7TcFeIXj1G3s WHERE County = '" + County + "'",
chartType: "ColumnChart",
options: {
title: County,
height: 400,
width: 400
}
});
}
答案 0 :(得分:1)
您使用了2个错误的列名:'BoysPupils','GirlsPupils'
它必须是'BoyPupils','GirlPupils'