Hello,

Most of the time the everything looks good, but I found this one
occasion where the chart is all messed up.  This is under IE6.0.2900
(by the way, chrome renders it fine, go figure).  Code pasted below...

Sam

<html>

<script type="text/javascript" src="http://www.google.com/jsapi";></
script>

<script type="text/javascript">
google.load("visualization", "1", {packages:
["piechart","imagepiechart"]});
google.setOnLoadCallback(drawChart);

function addRowData(data,label,value,fvalue) {
  var r = data.addRow();
  data.setCell(r, 0, label, label);
  data.setCell(r, 1, value, fvalue);

}

function drawChart() {

  var data = new google.visualization.DataTable();

  //bind all the following...
  data.addColumn('string', 'Compensation Type');
  data.addColumn('number', 'Amount');


    //setCell(data.addRow(), columnIndex, value [, formattedValue [,
properties]])
        addRowData(data,'Base Pay',31657.6,'$31,657.60');
        addRowData(data,'Bonus Pay',600,'$600.00');
        addRowData(data,'OT, Shift, etc',555.41,'$555.41');
        addRowData(data,'Benefits',8401.56,'$8,401.56');
        addRowData(data,'401(k) Match',1266.30,'$1,266.30');
        addRowData(data,'Others',1315.93,'$1,315.93');

  var chart = new google.visualization.PieChart(document.getElementById
('chart_div'));
  chart.draw(data, {legend: 'top',width: 300, height: 600, is3D: true,
enableTooltip:true, title: 'Your Total Rewards - $43,796.80'});
  chart.setSelection([{row: 0},{row: 1},{row: 2},{row: 3},{row: 4},
{row: 5},{row: 6},{row: 7},{row: 8},{row: 9}]);

  }

</script>

<body>
<table>
      <tr>
        <td id="HEADER_LOGO" colspan="2" align="right"
width="100%"><img src="" alt="Header Logo" width="300" height="67" /></
td>
      </tr>
      <tr><td colspan="2">&nbsp</td></tr> <!--Spacer -->
      <tr>
        <td valign="top">
          <div id="letter" class="TRSLETTER" style="width: 300px;
height: 300px;">
          </div>
        </td>
        <td valign="top">
          <!--google visualtions used to build pie chart -->
          <div id="chart_div"></div>
        </td>
      </tr>
</table>
</body>
</html>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to