title: Data column(s) for axis #0 cannot be of type string error in google chart
body: <p>I tried to populate google chart datatable in server side using PHP.I got JSON file properply, but the Chart not display in client Application. I got error-<strong>Data column(s) for axis #0 cannot be of type string</strong> . My coding is below here.</p>
  
  <p>After fetching data from database, </p>
  
  <pre><code>$colarray=array(array("id"=&gt;"","label"=&gt;"userid","pattern"=&gt;"","type"=&gt;"number"),array("id"=&gt;"","label"=&gt;"name","pattern"=&gt;"","type"=&gt;"string"));
  
    $final=array();
      for($i=0;$i&lt;$rows;$i++) 
      {
       $id[$i]=pg_fetch_result($res1,$i,'id');
       $name[$i]=pg_fetch_result($res1,$i,'name');
       $prefinal[$i]=array("c"=&gt;array(array("v"=&gt;$name[$i]),array("v"=&gt;$name[$i])));
       array_push($final,$prefinal[$i]);
      }
  
  
      $table['cols']=$colarray;
      $table['rows']=$final;
      echo json_encode($table);
  </code></pre>
  
  <p><strong>My Output Json:</strong></p>
  
  <pre><code>{
    "cols":[
      {"id":"","label":"userid","pattern":"","type":"number"},
      {"id":"","label":"name","pattern":"","type":"string"}
     ],
    "rows":[
      {"c":[{"v":"101"},{"v":"Aircel"}]},
      {"c":[{"v":"102"},{"v":"Srini"}]},
      {"c":[{"v":"103"},{"v":"Tamil"}]},
      {"c":[{"v":"104"},{"v":"Thiyagu"}]},
      {"c":[{"v":"105"},{"v":"Vasan"}]},
      {"c":[{"v":"107"},{"v":"Senthil"}]},
      {"c":[{"v":"108"},{"v":"Sri"}]},
      {"c":[{"v":"109"},{"v":"Docomo"}]},
      {"c":[{"v":"106"},{"v":"Innodea"}]}
      ]
  }
  </code></pre>
  
  <p>How to solve this issue?</p>