Hey Alexandre, You don't need to use this like normal JSON - You can use the getDataTable function to create a data table out of the response - try something like this:
var data = response.getDataTable(); You can then use the 'data' variable directly in a draw function like this: table.draw(data); Let me know if this is helpful On Tue, Jul 23, 2019 at 5:27 PM Alexandre Rodrigues < [email protected]> wrote: > > Hi all, Since I can use google charts with the json file below, I am > unable to make his call. I would like to have an example that works. > > > *json file:* > google.visualization.Query.setResponse( { version: "0.7", status: "ok", > reqId: 0, table: { cols: [ {id: "DATE", label: "DATE", type: "string"}, > {id: "TOTAL", label: "TOTAL", type: "string"} ], rows: [ {c: [ {v: > "01\/07\/19"}, {v: "19506"} ]} ,{c: [ {v: "02\/07\/19"}, {v: "19409"} ]} > ,{c: [ {v: "03\/07\/19"}, {v: "18380"} ]} ,{c: [ {v: "04\/07\/19"}, {v: > "19423"} ]} ,{c: [ {v: "05\/07\/19"}, {v: "20851"} ]} ,{c: [ {v: > "06\/07\/19"}, {v: "15379"} ]} ,{c: [ {v: "07\/07\/19"}, {v: "6227"} ]} > ,{c: [ {v: "08\/07\/19"}, {v: "20324"} ]} ,{c: [ {v: "09\/07\/19"}, {v: > "19955"} ]} ,{c: [ {v: "10\/07\/19"}, {v: "22530"} ]} ,{c: [ {v: > "11\/07\/19"}, {v: "10266"} ]} ,{c: [ {v: "12\/07\/19"}, {v: "19304"} ]} > ,{c: [ {v: "13\/07\/19"}, {v: "14530"} ]} ,{c: [ {v: "14\/07\/19"}, {v: > "5820"} ]} ,{c: [ {v: "15\/07\/19"}, {v: "21763"} ]} ,{c: [ {v: > "16\/07\/19"}, {v: "23497"} ]} ,{c: [ {v: "17\/07\/19"}, {v: "21897"} ]} > ,{c: [ {v: "18\/07\/19"}, {v: "21124"} ]} ,{c: [ {v: "19\/07\/19"}, {v: > "20228"} ]} ,{c: [ {v: "20\/07\/19"}, {v: "13727"} ]} ,{c: [ {v: > "21\/07\/19"}, {v: "4340"} ]} ] } } ) > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-visualization-api/820b384e-1c30-42f2-97d4-d02e846d1328%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/820b384e-1c30-42f2-97d4-d02e846d1328%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- IT Service Coordinator | College of Science and Engineering | cse.umn.edu University of Minnesota - Twin Cities Campus | umn.edu [email protected] <[email protected]>| 612-624-7588 | Keller Hall 1-229 -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CANFCHkQ9HWttgWZORzBix3HXkLic2%3D2L7%3DaOjR2aCUX%3DDEdMag%40mail.gmail.com.
