I tried to switch back using the following code:
VisualizationUtils.loadVisualizationApi(new Runnable() {
public void run() {
Dispatcher.dispatch(AppEvents.NavLogin);
}
}, BarChart.PACKAGE, AnnotatedTimeLine.PACKAGE);
but I only get the following error message:
[FATAL] Uncaught JavaScript exception [invalid quantifier {] in
http://www.google.com/uds/api/visualization/1.0/357a57f610020b26f132bc277458c86c/default,annotatedtimeline+en,barchart.I.js,
line 261
when I load the api via the host page it works again..looks like a
regression bug to me....
On 19 Mai, 22:26, googelybear <[email protected]> wrote:
> oh darn, I changed it for the worse! When migrating to the latest gwt-
> visualizations version I had a look at one of the built-in examples
> and there the api was loaded via the hostpage so I thought that's the
> preferable way to do it and adapted my code accordingly. So what you
> would suggest is going back to the Ajaxloader.loadApis - is that
> correct?
>
> I'm using a 32bit linux machine and in a previous version the bar
> graphs were showing up in hosted mode (even if that's not the case
> anymore it should not throw such an exception, which indicates that
> I'm doing something wrong).
>
> On 19 Mai, 15:52, "Eric Z. Ayers" <[email protected]> wrote:
>
> > On May 18, 6:01 pm, googelybear <[email protected]> wrote:
>
> > > I don't see how that's possible because the packages for the required
> > > charts are loaded in the host page:
> > > <script type="text/javascript" src="http://www.google.com/jsapi"></
> > > script>
> > > <!-- Load packages for visualization API. -->
> > > <script type="text/javascript">
> > > google.load("visualization", "1", {'packages' :
> > > ["annotatedtimeline", "barchart"] });
> > > </script>
>
> > This could be part of the problem. The google.load() call is
> > asynchronous and returns immediately. Since you didn't set a callback,
> > your code has no idea when the API is ready for use. This is where
> > using the Java version of ajax loader support might have made things
> > easier.
>
> > > and for the first charts to get displayed (in my case the barcharts)
> > > you need to log in first. But even if I wait some time and then login
> > > the problem occurrs...
>
> > I don't recall which platform you are using. Some of the
> > visualizations do not show up in Linux hosted mode.
>
> > > On 18 Mai, 19:09, "Eric Z. Ayers" <[email protected]> wrote:
>
> > > > Hmm... My offhand guess is that you are making calls into the API
> > > > before the AjaxLoader or VisualizationUtils.loadAPI() method Runnable
> > > > returns.
>
> > > > On May 15, 8:32 am, googelybear <[email protected]> wrote:
>
> > > > > Hi,
>
> > > > > When I call DataTable.create(); in my app I get the following
> > > > > exception:
>
> > > > > com.google.gwt.core.client.JavaScriptException: (TypeError):
> > > > > $wnd.google.visualization.DataTable is not a constructor
> > > > > fileName: jar:file:/home/myapp/lib/gwt-visualization.jar!/com/google/
> > > > > gwt/visualization/client/DataTable.java
> > > > > lineNumber: 33
> > > > > stack: ()@jar:file:/home/myapp/lib/gwt-visualization.jar!/com/google/
> > > > > gwt/visualization/client/DataTable.java:33
> > > > > private void com.google.gwt.http.client.Request.fireOnResponseReceived
> > > > > (com.google.gwt.http.client.RequestCallback)([object
> > > > > gwt_nativewrapper_class])@:0
> > > > > ()@jar:file:/opt/gwt-linux-1.6.4/gwt-user.jar!/com/google/gwt/http/
> > > > > client/XMLHTTPRequest.java:253
> > > > > @:0
>
> > > > > This only happens in the embedded browser. When I compile it and open
> > > > > it in forefox the bar chart is displayed. Any ideas what I'm doing
> > > > > wrong?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---