Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Programming Languages
Javascript
Changing the content in the infoWindow from text to pie char
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="nat06, post: 5165708, member: 71070"] Hello, I made my web form to display infowindows for every marker on the Google Maps, and it works good. But, when I tried to change the text in the infoWindow to pie chart it doesn't work anymore. The pie chart is not drawn, and the infowindow doesn't appear at all. Here is the part of the code where I define the infoboxes and the content inside function initMarkersE(map, markerData){var newMarkers =[], marker; for(var i =0; i < markerData.length; i++){ bounds.extend(markerData[i].latLng); map.fitBounds(bounds); marker =new google.maps.Marker({ map: map, draggable:true, position: markerData[i].latLng, visible:true}), newMarkers.push(marker); [B]var data =[['state','cycles','Los']]; data.push([markerData[i].state, markerData[i].cycles, markerData[i].Los]); infoboxOptions ={ pieHole:0.4,'width':400,'height':150};var node = document.createElement("div"); newMarkers[i].infobox =newInfoBox(infoboxOptions), chart =new google.visualization.PieChart(node); chart.draw(data, infoboxOptions); infobox.setContent(node); newMarkers[i].infobox.open(map, marker);[/i][/i][/i][/i][/i][/B][i][i][i][i][i] google.maps.event.addListener(marker,'click',(function(marker, i){returnfunction(){ newMarkers[i].infobox.open(map,this); map.panTo(markerData[i].latLng);}})(marker, i));} return newMarkers;} I changed/added only the bold part of the code, the rest is the same like when the infoboxes were displaying text data. So the same data/parameters I want to be displayed as a pie chart. Can anybody help me please? Thanks.[/i][/i][/i][/i][/i][/i][/i][/i][/i] [/QUOTE]
Verification
Post reply
Forums
Programming Languages
Javascript
Changing the content in the infoWindow from text to pie char
Top