Hi Dan,
here is the code they start you off with (below). I am curious where I put your code so that my maptree would dsiplay on an ipad. I tried a few different inserts, but nothing seemed to work -- and know it is me (since I don't really know code at all) not your code.
Thanks for the help!
Mike
<html><br />
<head><br />
<script type="text/javascript" src="
https://www.google.com/jsapi"></script><br />
<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([
On Sunday, November 18, 2012 1:42:38 AM UTC-5, Dan Moran wrote:
hmm, third post is the charm, I swear.
You can only create the mousewheel handler after the treemap has been fully rendered. So the code should be
function drawChart(){
//...
// Create the chart here
// ....
// Add a mousewheel handler when the chart has been drawn
google.visualization.events.addListener(tree, 'ready', function(){
document.getElementById('chart_div').onmousewheel = function(e){
if ("wheelDelta" in e) if (e.wheelDelta<0) return; // Only consider scrolling in one direction
if (tree) tree.goUpAndDraw();
}
});
} // createChart()
-r