Having trouble creating the following tree map, trying to do education 
spending in the United States and breaking down by region then individual 
states. Here's my code right now:

<html>
  <head>
    <script type="text/javascript" 
src="https://www.google.com/jsapi";></script>
    <script type="text/javascript">
      google.load("visualization", "1", {packages:["treemap"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        // Create and populate the data table.
        var data = google.visualization.arrayToDataTable(
        [
  ["Location","Parent","Spending in $millions (size)"],
  ["United States","Null",340852],
  ["New England","United States",15622],
  ["Connecticut","New England",3930],
  ["Maine","New England",1297],
  ["Massachusetts","New England",6402],
  ["New Hampshire","New England",1171],
  ["Rhode Island","New England",1209],
  ["Vermont","New England",1613],
  ["Mid-Atlantic","United States",60428],
  ["Deleware","Mid-Atlantic",2227],
  ["Maryland","Mid-Atlantic",7073],
  ["New Jersey","Mid-Atlantic",12651],
  ["New York","Mid-Atlantic",25657],
  ["Pennsylvania","Mid-Atlantic",12820],
  ["Greater Lakes","United States",49777],
  ["Illinois","Greater Lakes",9588],
  ["Indiana","Greater Lakes",8680],
  ["Michigan","Greater Lakes",13059],
  ["Ohio","Greater Lakes",11515],
  ["Wisconsin","Greater Lakes",6935],
  ["Plains","United States",24863],
  ["Iowa","Plains",3251],
  ["Kansas","Plains",3737],
  ["Minnesota","Plains",9729],
  ["Missouri","Plains",5229],
  ["Nebraska","Plains",1488],
  ["North Dakota","Plains",851],
  ["South Dakota","Plains",578],
  ["Southeast","United States",73887],
  ["Alabama","Southeast",5165],
  ["Arkansas","Southeast",3342],
  ["Florida","Southeast",12636],
  ["Georgia","Southeast",9916],
  ["Kentucky","Southeast",5021],
  ["Louisiana","Southeast",5367],
  ["Mississippi","Southeast",3174],
  ["North Carolina","Southeast",10605],
  ["South Carolina","Southeast",3903],
  ["Tennessee","Southeast",5609],
  ["Virginia","Southeast",6928],
  ["West Virginia","Southeast",2221],
  ["Southwest","United States",37961],
  ["Arizona","Southwest",5454],
  ["New Mexico","Southwest",2870],
  ["Oklahoma","Southwest",3474],
  ["Texas","Southwest",26163],
  ["Rocky Mountain","United States",13682],
  ["Colorado","Rocky Mountain",7547],
  ["Idaho","Rocky Mountain",1634],
  ["Montana","Rocky Mountain",936],
  ["Utah","Rocky Mountain",3091],
  ["Wyoming","Rocky Mountain",474],
  ["Far West","United States",64632],
  ["Alaska","Far West",1635],
  ["California","Far West",47674],
  ["Hawaii","Far West",1794],
  ["Nevada","Far West",1976],
  ["Oregon","Far West",3680],
  ["Washington","Far West",7873]
]);

 var tree = new 
google.visualization.TreeMap(document.getElementById('chart_div'));
        tree.draw(data, {
          headerHeight: 15,
          fontColor: 'black',
          showScale: true});
        }
    </script>
  </head>

-- 
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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to