Motion Chart not working - no data displayed

313 views
Skip to first unread message

ytbryan

unread,
Apr 23, 2009, 11:56:23 AM4/23/09
to Google Visualization API
hi all,

basically i followed the instruction here
http://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis&t=VisualizationGettingStarted
and change the pie chart to motion chart.The outline of the motion
chart does appear but with no data.

I hope someone can advise me! below is my code:

RUNNABLE

Runnable onLoadCallback = new Runnable() {
public void run() {
Panel panel = RootPanel.get();

// Create a pie chart visualization.
MotionChart mc = new MotionChart(createTable2(),createOptions2
());
panel.add(mc);
}
};

AjaxLoader.loadVisualizationApi(onLoadCallback,
MotionChart.PACKAGE);
}

CREATEOPTION2()

private
com.google.gwt.visualization.client.visualizations.MotionChart.Options
createOptions2() {

com.google.gwt.visualization.client.visualizations.MotionChart.Options
options =
com.google.gwt.visualization.client.visualizations.MotionChart.Options.create
();
options.setWidth(1000);
options.setHeight(500);
return options;
}

CREATETABLE2() --- i got it from here
http://code.google.com/apis/visualization/documentation/gallery/motionchart.html


private AbstractDataTable createTable2() {
DataTable data = DataTable.create();
data.addRows(6);
data.addColumn(ColumnType.STRING, "Fruit");
data.addColumn(ColumnType.DATE, "Date");
data.addColumn(ColumnType.NUMBER, "Sales");
data.addColumn(ColumnType.NUMBER, "Expenses");
data.addColumn(ColumnType.STRING, "Location");
data.setValue(0, 0, "Apples");
data.setValue(0, 1, new Date (1988,0,1));
data.setValue(0, 2, 1000);
data.setValue(0, 3, 300);
data.setValue(0, 4, "East");
data.setValue(1, 0, "Oranges");
data.setValue(1, 1, new Date (1988,0,1));
data.setValue(1, 2, 950);
data.setValue(1, 3, 200);
data.setValue(1, 4, "West");
data.setValue(2, 0, "Bananas");
data.setValue(2, 1, new Date (1988,0,1));
data.setValue(2, 2, 300);
data.setValue(2, 3, 250);
data.setValue(2, 4, "West");
data.setValue(3, 0, "Apples");
data.setValue(3, 1, new Date(1988,1,1));
data.setValue(3, 2, 1200);
data.setValue(3, 3, 400);
data.setValue(3, 4, "East");
data.setValue(4, 0, "Oranges");
data.setValue(4, 1, new Date(1988,1,1));
data.setValue(4, 2, 900);
data.setValue(4, 3, 150);
data.setValue(4, 4, "West");
data.setValue(5, 0, "Bananas");
data.setValue(5, 1, new Date(1988,1,1));
data.setValue(5, 2, 788);
data.setValue(5, 3, 617);
data.setValue(5, 4, "West");
return data;
}

ytbryan

unread,
Apr 23, 2009, 2:54:45 PM4/23/09
to Google Visualization API
i don think the problem is with my gwt.xml .... but copying here to
play safe:

GWT.XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.4//
EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-
source/core/src/gwt-module.dtd">
<module rename-to='visualise'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.visualization.Visualization'/>


<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->

<!-- Other module inherits -->

<!-- Specify the app entry point class. -->
<entry-point class='com.visual.client.Visualise'/>
</module>



On Apr 23, 5:56 pm, ytbryan <ytbr...@gmail.com> wrote:
> hi all,
>
> basically i followed the instruction herehttp://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis...
> and change the pie chart to motion chart.The outline of the motion
> chart does appear but with no data.
>
> I hope someone can advise me! below is my code:
>
> RUNNABLE
>
>     Runnable onLoadCallback = new Runnable() {
>       public void run() {
>         Panel panel = RootPanel.get();
>
>         // Create a pie chart visualization.
>         MotionChart mc = new MotionChart(createTable2(),createOptions2
> ());
>         panel.add(mc);
>       }
>     };
>
>     AjaxLoader.loadVisualizationApi(onLoadCallback,
> MotionChart.PACKAGE);
>   }
>
> CREATEOPTION2()
>
>   private
> com.google.gwt.visualization.client.visualizations.MotionChart.Options
> createOptions2() {
>
> com.google.gwt.visualization.client.visualizations.MotionChart.Options
> options =
> com.google.gwt.visualization.client.visualizations.MotionChart.Options.create
> ();
>             options.setWidth(1000);
>             options.setHeight(500);
>             return options;
>           }
>
> CREATETABLE2() --- i got it from herehttp://code.google.com/apis/visualization/documentation/gallery/motio...

ytbryan

unread,
Apr 23, 2009, 6:47:04 PM4/23/09
to Google Visualization API
Hi guys..

i just tested it on my mac os ... and it seems to be working fine....

this is puzzling as i didn't change anything ....

i was using vista business .... anybody has any idea?

VizGuy

unread,
Apr 26, 2009, 3:10:35 AM4/26/09
to google-visua...@googlegroups.com
Hi,

So a few things:
First, please confirm that you tested arll cases from http and not locally (file://) as there are known issues with local flash visualizations.
Then, please repeat again with the details of where it did work, and on what cases it didn't, so we can try to have a deeper look.

Regards,
VizGuy

ytbryan

unread,
Apr 27, 2009, 5:49:00 AM4/27/09
to Google Visualization API
thank you for your reply.

But it should be running the same way on hosted mode right?

what do you mean by "tested arll cases from http and not locally "

what i did was I shift the same code from mac os to vista business and
the motion chart stop working at vista. nothing appear. when i shift
the code back to mac os... it works.. i tested on two vista.. same
thing happen... can someone help me? no error code is shown and the
rest of the code runs fine but the motion chart is just not
displayed!!

On Apr 26, 9:10 am, VizGuy <viz...@google.com> wrote:
> Hi,
> So a few things:
> First, please confirm that you tested arll cases from http and not locally
> (file://) as there are known issues with local flash visualizations.
> Then, please repeat again with the details of where it did work, and on what
> cases it didn't, so we can try to have a deeper look.
>
> Regards,
> VizGuy
>

Eric Z. Ayers

unread,
Apr 27, 2009, 10:08:14 AM4/27/09
to Google Visualization API
Try compiling your project on Vista and running it from Internet
Explorer on Vista (using locahost:<port>// URL while running hosted
mode).

If that works, you are encountering a GWT Hosted mode problem and
should take it up on the Google-Web-Toolkit group. I just re-compiled
and re-ran the VisualizationShowase from the Visualization API GWT
bindings using GWT Hosted mode on Windows XP with no problems. The
motion chart demo does not run when the URL is from the filesystem
(e.g. file:///c:/ whatever)

-Eric.

ytbryan

unread,
Apr 29, 2009, 9:16:24 AM4/29/09
to Google Visualization API
thanks eric.... it's working fine on firefox......

i will bring this up to gwt group then....... thank you for your
help :)

On Apr 27, 4:08 pm, "Eric Z. Ayers" <zun...@google.com> wrote:
> Try compiling your project on Vista and running it from Internet
> Explorer on Vista (using  locahost:<port>// URL while running hosted
> mode).
>
> If that works, you are encountering a GWT Hosted mode problem and
> should take it up on the Google-Web-Toolkit group.  I just re-compiled
> and re-ran the VisualizationShowase from the Visualization API GWT
> bindings using GWT Hosted mode on Windows XP with no problems.  The
> motion chart demo does not run when the URL is from the filesystem
> (e.g. file:///c:/ whatever)
>
> -Eric.
>
> On Apr 27, 5:49 am,ytbryan<ytbr...@gmail.com> wrote:
>
> > thank you for your reply.
>
> > But it should be running the same way on hosted mode right?
>
> > what do you mean by "tested arll cases from http and not locally "
>
> > what i did was I shift the same code from mac os to vista business and
> > the motion chart stop working at vista. nothing appear. when i shift
> > the code back to mac os... it works.. i tested on two vista.. same
> > thing happen... can someone help me? no error code is shown and the
> > rest of the code runs fine but the motion chart is just not
> > displayed!!
>
> > On Apr 26, 9:10 am, VizGuy <viz...@google.com> wrote:
>
> > > Hi,
> > > So a few things:
> > > First, please confirm that you tested arll cases from http and not locally
> > > (file://) as there are known issues with local flash visualizations.
> > > Then, please repeat again with the details of where it did work, and on what
> > > cases it didn't, so we can try to have a deeper look.
>
> > > Regards,
> > > VizGuy
>
> > > On Fri, Apr 24, 2009 at 1:47 AM,ytbryan<ytbr...@gmail.com> wrote:
>
> > > > Hi guys..
>
> > > > i just tested it on my mac os ... and it seems to be working fine....
>
> > > > this is puzzling as i didn't change anything ....
>
> > > > i was using vista business .... anybody has any idea?
>
> > > > On Apr 23, 8:54 pm,ytbryan<ytbr...@gmail.com> wrote:
> > > > > i don think the problem is with my gwt.xml .... but copying here to
> > > > > play safe:
>
> > > > > GWT.XML
>
> > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.4//
> > > > > EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-
> > > > > source/core/src/gwt-module.dtd">
> > > > > <module rename-to='visualise'>
> > > > >   <!-- Inherit the core Web Toolkit stuff.                        -->
> > > > >   <inherits name='com.google.gwt.user.User'/>
> > > > >     <inherits name='com.google.gwt.visualization.Visualization'/>
>
> > > > >   <!-- Inherit the default GWT style sheet.  You can change       -->
> > > > >   <!-- the theme of your GWT application by uncommenting          -->
> > > > >   <!-- any one of the following lines.                            -->
> > > > >   <inherits name='com.google.gwt.user.theme.standard.Standard'/>
> > > > >   <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
> > > > >   <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     -->
>
> > > > >   <!-- Other module inherits                                      -->
>
> > > > >   <!-- Specify the app entry point class.                         -->
> > > > >   <entry-point class='com.visual.client.Visualise'/>
> > > > > </module>
>

Dave Goodall

unread,
Apr 29, 2009, 12:16:46 PM4/29/09
to google-visua...@googlegroups.com
Hello,
If your motion chart does not show up when running locally check this page:
http://www.ezds.com/html/kintana_products_metrics_deploy_mc_type_help.html
dave goodall
--
___________________________________________
I'll have it all figured out by the time we reach the frontier.
What's that?
The frontier
__________________________ The Last Starfighter
Reply all
Reply to author
Forward
0 new messages