ok. I found out my problem is I forgot to put the following code in my
html file:
<script type="text/javascript">
google.load("visualization", "1", {'packages' : ["piechart",
"table"] });
</script>
-Michael
On May 13, 8:52 am, Rafael Barrera Oro <
boraf...@gmail.com> wrote:
> I am creating a PieChart within a callback method (see the code below) so i
> think that should not be a problem.
>
> // Create a callback to be called when the visualization API
> // has been loaded.
> Runnable onLoadCallback = new Runnable() {
> public void run() {
> Panel panel = RootPanel.get();
>
> // Create a pie chart visualization.
> PieChart pie = new PieChart(createTable(), createOptions());
>
> pie.addSelectHandler(createSelectHandler(pie));
> panel.add(pie);
> }
> };
>
> // Load the visualization api, passing the onLoadCallback to be called
> // when loading is done.
> AjaxLoader.loadVisualizationApi(onLoadCallback, PieChart.PACKAGE);
> }
>
> Anyway, i discovered that if the project is packaged into a war and deployed
> on a tomcat server, the PieChart works perfectly, its only in hosted mode
> that it does not work, i still think is some problem with the way that the
> hosted browser behaves (if i
typewww.google.com/jsapiin the hosted browser
> i get a not found error).
>
> ¡Thanks for the reply!
>
> Rafael
>
> 2009/5/9 Craig Schroeder <
craigdat...@gmail.com>
>
>
>
> > Rafael,
> > One point to consider is if all your visualization related GWT code is in
> > the proper place.
>
> > I'm sure you've seen the examples, but as a reminder....
> > Anything that looks like "x = new ColumnChart();" needs to be inside of the
> > callback used when making the AJAX call or called from that callback.
> > i.e. if you want to use a callback called onLoadCallback as done in the
> > examples you'd get the following:
>
> > public void onModuleLoad() {
> > Runnable onLoadCallback = new Runnable() {
> > public void run() {
> > x = new AnnotatedTimeLine("700", "300");
> > y = new Table();
> > z = new ColumnChart();
> > .............
> > }
> > }
> > .............
> > AjaxLoader.loadVisualizationApi(onLoadCallback, ColumnChart.PACKAGE,
> > Table.PACKAGE, AnnotatedTimeLine.PACKAGE);
> > }
>
> > --Craig
>
> > On Fri, May 8, 2009 at 12:16 PM, Rafael Barrera Oro <
boraf...@gmail.com>wrote:
>
> >> Frustrating indeed!
>
> >> I shall try the GWT groups and see what happends...
>
> >> Thanks for all the help anyway!
>
> >> Rafael
>
> >> 2009/5/8 Eric Z. Ayers <
zun...@google.com>
>
> >>> Hi Rafael,
>
> >>> Sounds like a frustrating problem! At this point, it looks like the
> >>> problem has nothing to do with the visualization api in particular.
> >>> Maybe you should try looking for answers on the Google-Web-Toolkit
> >>> group if you haven't already.
>
> >>> You can post this link to the thread we are on so you don't have to go
> >>> through describing everything again.
>
> >>>
http://groups.google.com/group/google-visualization-api/browse_thread...
>
> >>> -Eric.
>
> >>> On May 7, 10:54 am, Rafael Barrera Oro <
boraf...@gmail.com> wrote:
> >>> > I should also mention that i am using Linux :P
>
> >>> > 2009/5/7 Eric Z. Ayers <
zun...@google.com>
>
> >>> > > Ah! This is a big clue. The hosted mode browser in windows embeds
> >>> > > Internet Explorer. There must be some setting in the Internet
> >>> > > Options on IE that affects your network connectivity or blocks
> >>> certain
> >>> > > sites. I've seen this come up in a previous posting to some group,
> >>> > > but I can't find it now.
>
> >>> > > -Eric.
>
> >>> > > On May 6, 11:27 am, Rafael Barrera Oro <
boraf...@gmail.com> wrote:
> >>> > > > I should mention that i am working in hosted mode (if i
> >>> > >
typewww.google.com/jsapiinmyevery day browser i get the expected
> >>> > > outcome),
> >>> > > awww.google.comcouldnotbe found error, i tryed adding it to the
> >>> whitelist
> >>> > > > using the whitelist argument but it did not work
>
> >>> > > > is this part of the problem or am i on the wrong track?
>
> >>> > > > Thanks for the reply!
>
> >>> > > > Rafael
>
> >>> > > > 2009/5/6 Eric Z. Ayers <
zun...@google.com>
>
> >>> > > > > Hmmm, is your development machine able to connect through the
> >>> internet
> >>> > > > > tohttp://
www.google.com/jsapi?Sometimesproxies or firewalls
> ...
>
> read more »