Hi Mark,
I got it working in IE8 using this code (thanks for your help!):
<script type="text/javascript">
google.load('visualization', '1', {'packages':['motionchart']});
google.setOnLoadCallback(drawChart);
function drawChart()
{
// To see the data that this visualization uses, browse to
//
http://spreadsheets.google.com/ccc?key=0AlDkiLyZtGBGdENBZDFxaFVIakpWWDZJLUI5ZTdwVmc&hl=en
var query = new google.visualization.Query('http://
spreadsheets.google.com/tq?
range=A1:E31&headers=-1&key=0AlDkiLyZtGBGdENBZDFxaFVIakpWWDZJLUI5ZTdwVmc&gid=0');
// Send the query with a callback function.
query.send(handleQueryResponse);
}
function handleQueryResponse(response)
{
if (response.isError()) { alert('Error in query: ' +
response.getMessage() + ' ' + response.getDetailedMessage());
return; }
var data = response.getDataTable();
var chart = new google.visualization.MotionChart
(document.getElementById('chart_container'));
var options = {};
options['state'] = '{"dimensions":{"iconDimensions":
["dim0"]},"nonSelectedAlpha":0.4,"orderedByX":false,"xZoomedDataMax":
60,"iconType":"BUBBLE","showTrails":false,"uniColorForNonSelected":false,"yLambda":
1,"duration":{"timeUnit":"Y","multiplier":1},"yZoomedDataMax":
70,"time":"2000","sizeOption":"4","xLambda":1,"xZoomedDataMin":
5,"yZoomedDataMin":2,"stateVersion":3,"xAxisOption":"2","playDuration":
6.75,"iconKeySettings":[{"key":
{"dim0":"Africa"}}],"yAxisOption":"3","yZoomedIn":false,"xZoomedIn":false,"orderedByY":false,"colorOption":"_UNIQUE_COLOR"};';
options['width'] = 662;
options['height'] = 500;
chart.draw(data, options);
}
</script>
On Sep 5, 6:05 pm, pol <[email protected]> wrote:
> Hi Mark,
>
> I tried the following, but I think I'm missing something (to embed the
> visualization in the code). This is a test file and when it runs, it
> says This.r is undefined. Any hints?
>
> thanks,
> Pol
>
> ---------- start code block
>
> <html>
> <head>
> <script type="text/javascript" src="http://www.google.com/jsapi"></
> script>
> <script type="text/javascript">
> google.load('visualization', '1', {'packages':['motionchart']});
> google.setOnLoadCallback(drawChart);
> function drawChart() {
> var data = new google.visualization.DataTable("http://
> spreadsheets.google.com/ccc?
> key=0AlDkiLyZtGBGdENBZDFxaFVIakpWWDZJLUI5ZTdwVmc&hl=en");
> varchart= new google.visualization.MotionChart
> (document.getElementById('chart_div'));
> chart.draw(data, {width:662, height:500});
> }
> </script>
> </head>
>
> <body>
> <div id="chart_div" style="width: 600px; height: 300px;"></div>
> </body>
> </html>
>
> --------- end code block
>
> On Sep 3, 11:11 am, Markw65 <[email protected]> wrote:
>
> > Well, you can find details of setting up
> > themotioncharthere:http://code.google.com/apis/visualization/documentation/gallery/motio...
>
> > The example is pretty much complete, except that it uses static data.
>
> > There's an example (but using the intensity map) of how to fetch from
> > a spreadsheet
> > here:http://code.google.com/apis/ajax/playground/?type=visualization#data_....
>
> > But Im still puzzled about your example. It works for me if I turn on
> > debugging (after reporting a couple of errors originating inside the
> > gadgets code), but not otherwise. And Chartman claims it works for him
> > without any errors...
>
> > Mark
>
> > On Sep 2, 7:13 pm, pol <[email protected]> wrote:
>
> > > Thanks Mark,
>
> > > It still doesn't run on myIE8installation. Can you explain how to
> > > embed the visualization directly on my page? (you are correct, it's
> > > running from the Google spreadsheet).
>
> > > Much appreciated!
>
> > > Pol
>
> > > On Aug 31, 4:53 pm, Markw65 <[email protected]> wrote:
>
> > > > Its odd. I get the same error (and for your page
> > > > athttp://pk-visual.com/data.html).
> > > > But if I just let it continue, I get themotionchartafter a few
> > > > seconds...
>
> > > > Seems like you're almost there :-)
>
> > > > I'll just note that this is a little different from what I've done...
> > > > I've embedded the geomap visualization directly in my page; you're
> > > > trying to embed the gadget, via a spreadsheets page (as far as I can
> > > > tell). That may be making things work differently (it appears to be
> > > > the gadgets code that is causing the error).
>
> > > > Mark
>
> > > > On Aug 31, 10:39 am, pol <[email protected]> wrote:
>
> > > > > Hi Everyone,
>
> > > > > I get this error onIE8for themotionchart, from the text string
> > > > > thatMotionChartgives me to embed it in the page. Note that on the
> > > > > screen it specifies that the "ifr" argument is invalid?
>
> > > > > Let me know if you have any ideas?
>
> > > > > Message: Invalid argument.
> > > > > ifr
> > > > > Line: 535
> > > > > Char: 7
> > > > > Code: 0
> > > > > URI:http://oj0ijfii34kccq3ioto7mdspc7r2s7o9.spreadsheets.gmodules.com/gad...
>
> > > > >
>
> > > > > On Aug 30, 12:50 am, pol <[email protected]> wrote:
>
> > > > > > Hi Mark,
>
> > > > > > I addressed what you noticed... and also took a look at the
> > > > > > javascript
> > > > > > errors. I elimintated the error that was coming from a library that
> > > > > > I
> > > > > > included, but didn't use... That left one error from the google code
> > > > > > itself (not my code) seemingly when parsing the command string that
> > > > > > I
> > > > > > copied into my code. Something about a string.to call not having
> > > > > > permission in 3 places...
>
> > > > > > If you have any other ideas, would be great... Thanks for yourhelpso
> > > > > > far either way,
>
> > > > > > Pol
>
> > > > > > check it out on:http://pk-visual.com/data.html
>
> > > > > > On Aug 29, 10:15 pm, Markw65 <[email protected]> wrote:
>
> > > > > > > Not sure if this is the problem, but the header in your page says:
>
> > > > > > > <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7
> > > > > > > charset=UTF-8" />
>
> > > > > > > I dont know whether that should work or not - but what I've used
> > > > > > > (with
> > > > > > > success) is:
>
> > > > > > > <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
>
> > > > > > > If I also need UTF-8, I add (as a separate tag):
> > > > > > > <meta http-equiv="content-type" content="text/html;
> > > > > > > charset=utf-8"/
>
> > > > > > > That said, it may have nothing to do with your problem... when I
> > > > > > > open
> > > > > > > your page inIE8, I get /lots/ of javascript errors. Its possible
> > > > > > > thats causing your code to bail out before it even gets to
> > > > > > > setting up
> > > > > > > themotionchart...
>
> > > > > > > SinceIE8has fairly reasonable javascript debugger, Id suggest
> > > > > > > starting there...
>
> > > > > > > Mark
>
> > > > > > > On Aug 29, 4:03 pm, pol <[email protected]> wrote:
>
> > > > > > > > Hey Mark,
>
> > > > > > > > I tried it, but unfortunately it didn't work. I tried using
> > > > > > > > that meta
> > > > > > > > tag both in addition to, and instead of, the existing
> > > > > > > > http-equiv tag
> > > > > > > > that was in the file, and it didn't work onIE8either way???
> > > > > > > > can you
> > > > > > > > take a look? http://pk-visual.com/data.html
>
> > > > > > > > Thanks so much.... I really need some kind of fix for this...
>
> > > > > > > > Best,
> > > > > > > > Pol
>
> > > > > > > > On Aug 29, 4:21 pm, pol <[email protected]> wrote:
>
> > > > > > > > > Mark,
>
> > > > > > > > > That's a great idea! I'm going to try that! thank you!
> > > > > > > > > Pol
>
> > > > > > > > > On Aug 29, 10:31 am, Markw65 <[email protected]> wrote:
>
> > > > > > > > > > But more helpfully, you can putIE8into IE7 mode by
> > > > > > > > > > including:
>
> > > > > > > > > > <meta http-equiv="X-UA-Compatible"
> > > > > > > > > > content="IE=EmulateIE7" />
>
> > > > > > > > > > In the <head> section of your page. With
> > > > > > > > > > that,motionchart(and all
> > > > > > > > > > the charts Ive tried) work fine inIE8.
>
> > > > > > > > > > Mark
>
> > > > > > > > > > On Aug 29, 5:19 am, ChartMan <[email protected]> wrote:
>
> > > > > > > > > > > Hi
> > > > > > > > > > > We are aware of the various issues inIE8. We are working
> > > > > > > > > > > on fixing them but
> > > > > > > > > > > I can not provide a time line.
>
> > > > > > > > > > > ChartMan
>
> > > > > > > > > > > On Sat, Aug 29, 2009 at 6:24 AM, pol
> > > > > > > > > > > <[email protected]> wrote:
>
> > > > > > > > > > > > Hi,
>
> > > > > > > > > > > > Can anyonehelpme figure out how to makeMotionChartwork
> > > > > > > > > > > > in IE 8?
> > > > > > > > > > > > It works fine embedded in my HTML page in firefox:
> > > > > > > > > > > >http://pk-visual.com/data.html
>
> > > > > > > > > > > > This is a big issue for me and the work I plan to be
> > > > > > > > > > > > doing, so any
> > > > > > > > > > > >helpwould be greatly appreciated!
>
> > > > > > > > > > > > Pol
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---