Re: Problems with activex webbrowser control and google charts

294 views
Skip to first unread message

asgallant

unread,
Aug 31, 2012, 12:28:29 PM8/31/12
to google-visua...@googlegroups.com
The only problem I can see with your code is that you are missing a double-quote in the div tag (in the style definition), which should only affect the dimensions of the chart, unless IE isn't able to compensate for the missing quote.

On Friday, August 31, 2012 9:03:12 AM UTC-4, MCL285 wrote:

I'm trying to load a google geochart into Webbrowser ActiveX Control.
When I navigate with this control to the site "https://developers.google.com/chart/interactive/docs/gallery/geochart"
all the charts are displayed fine in the Webbrowser Control.

When I try to load te code for the chart from i.e. "C:\myfile.html" the chart is not displayed in the Webbrowser Control.
The myfile.html has the following code:

<html>
<head>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {'packages': ['geochart']});
google.setOnLoadCallback(drawRegionsMap);
function drawRegionsMap() {
var data = google.visualization.arrayToDataTable([
['Country', 'AmountOpen'],
['Spanje', 642127],
['Ukraine', 526839],
['Russian Federation', 509822]
]);
var options = {region: '150'};
var chart = new google.visualization.GeoChart(document.getElementById('chart_div'));
chart.draw(data, options);     };
</script>
</head>
<body>
<div id="chart_div"style=width: 900px; height: 500px;"></div>
</body>
</html>
 
Can anyone help?

 

MCL285

unread,
Aug 31, 2012, 12:39:26 PM8/31/12
to google-visua...@googlegroups.com
Thanks,
Anyway i found a solution;
I had to ad the "Mark of the web" to the code
Reply all
Reply to author
Forward
0 new messages