Hello, I am trying to generate the json files that I could use to make a google material bar chart. I want to show a comparison on three different sets of data like the following screen shot shows (which is generated using a regular array). <https://lh3.googleusercontent.com/-L5OO9MYgafQ/VwyVxMWKuJI/AAAAAAAAAD4/6d9b_NLGamw4mVsgiHUyF-XIm2Ees1LvwCLcB/s1600/Screen%2BShot%2B2016-04-12%2Bat%2B1.24.52%2BAM.png> I tried to wirte a similar json file as the array does for the previous graph, but it ended up like <https://lh3.googleusercontent.com/-6i9h98H0KVU/VwyWRTBtsCI/AAAAAAAAAD8/d_MliIKutRUXIjlrckxbjFyf-_wgBWRfACLcB/s1600/Screen%2BShot%2B2016-04-12%2Bat%2B1.31.12%2BAM.png> Here is the code I used to generate json: $cols = array( array("id" =>"type", "lable" => "Sensor Type", "type" => "string"), array("id" =>"hum", "lable" => "Humidity", "type" => "number"), array("id" =>"temp", "lable" => "Temperature", "type" => "number"), array("id" =>"light", "lable" => "Light", "type" => "number") ); $rows = array( array("c"=>array(array("v" => "Average"), array("v" => $average["HUM"]), array("v" => $average["TEMP"]), array("v" => $average["LIGHT"]))), array("c"=>array(array("v" => "Maximum"), array("v" => $maximum["HUM"]), array("v" => $maximum["TEMP"]), array("v" => $maximum["LIGHT"]))), array("c"=>array(array("v" => "Minimum"), array("v" => $minimum["HUM"]), array("v" => $minimum["TEMP"]), array("v" => $minimum["LIGHT"]))) ); $result = array("cols" => $cols, "rows" => $rows); return $result; And the javascript code I use this file to generate the graph: -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/5fdac6b3-ab24-4038-af91-71b17f30264e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
