未捕获错误:缺少对请求ID的查询:reqId:0

时间:2014-03-05 12:47:20

标签: google-visualization

尝试使用以下示例将数据从PHP推送到Google Charts Api:

https://code.google.com/apis/ajax/playground/?type=visualization&hl=es#chart_editor

我的代码返回:

google.visualization.Query.setResponse({"version":"0.6","status":"ok","reqId":"reqId:0","table":{"cols":[{"id":"col_Fecha","label":"Fecha","pattern":"","type":"string"},{"id":"col_Importe","label":"Importe","pattern":"#0.###############","type":"number"}],"rows":[{"c":[{"v":"2014-02-10 13:47:47"},{"v":"885.79"}]}]}});

哪种是有效的JSON格式。

我仍然得到:'未捕获错误:缺少对请求ID的查询:reqId:0'

我只是找不到问题。有什么帮助吗?

1 个答案:

答案 0 :(得分:0)

由于David Aasgallant在评论中指出我的请求是错误的,应该是“reqId”:“0”,而不是“reqId”:“reqId:0”