Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 25th, 2012  |  syntax: None  |  size: 0.45 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Label colors Google Pie Chart
  2. var data = new google.visualization.DataTable();
  3.  
  4. data.addColumn('string', 'Task');
  5. data.addColumn('number', 'Hours per Day');
  6. data.addRows([
  7.       ['Work',    11],
  8.       ['Eat',      2],
  9.       ['Commute',  2]
  10. ]);
  11.  
  12. var options = {
  13.     title: 'My Daily Activities',
  14.     colors: ['red','#004411', '#bada55']
  15. };
  16.  
  17. var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
  18. chart.draw(data, options);