how  can I formatting  a Table  Column  (e.g. column 'total')  when I use 
the   new google.visualization.ChartWrapper()  an the data comes from a 
data query, not from an data array. like that;  

   var qr =  "SELECT M, Sum(E)  where E > 0  GROUP BY M  ORDER BY  M    
label M 'year',  Sum(E) 'total' "
   wrap = new google.visualization.ChartWrapper()  

....
   wrap.setQuery(query);
....
   
   wrap.draw();
    

This is the synthax to formatting a table column when the data comes from a 
data array:, documentet in the google charts documentation page:

var data = new google.visualization.DataTable();
data.addColumn('string', 'Department');
data.addColumn('number', 'Revenues');
data.addRows([
  ['Shoes', 10700],
  ['Sports', -15400],
  ['Toys', 12500],
  ['Electronics', -2100],
  ['Food', 22600],
  ['Art', 1100]
]);

var table = new 
google.visualization.Table(document.getElementById('numberformat_div'));




*var formatter = new google.visualization.NumberFormat(    {prefix: '$', 
negativeColor: 'red', negativeParens: true});formatter.format(data, 1); // 
Apply formatter to second column*
table.draw(data, {*allowHtml: true*, showRowNumber: true, width: '100%', 
height: '100%'})

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
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/820005ca-f764-4c78-8fa5-463db10367e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to