json - How the google charts query language works? -
i have implemented own datasource in go, returns json string. data source working fine , returning correct json format expected chart (which table object make tests easier).
now, i'd able use query language features chart , not figure out how query language works. let's take table below example:
name | age | phone ------------------------------- john | 23 | 12341234 chris | 47 | 54223452 sam | 36 | 69694356
when called, datasource return json representation of entire table above. in theory, should able javascript
query.setquery('select name, age');
so, result ignore column "phone".
now, question is:
is setquery() method applied json response only, or datasource should able handle query on request , return correct data (only name , age columns). i'm not sure if query language act on json response or if it's interface tell server , server should able prepare correct data.
i'm asking because said, json response works fine, setquery() method being ignored. table shows entire dataset, no matter put on setquery method. if define column not exist, not cause error. did tests using google spreadsheet , works fine. should add structure of json response app , 1 google spreadsheet looks same. appreciated.
thanks,
jb
Comments
Post a Comment