pombreda / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

Corechart doesn't work #445

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release:
I'm trying to display PieChart from the CoreChart package.
with library 1.1.1

Platform information (OS, Browser, GWT version).  Does the issue exist on
other platforms?
windows 7 64bit inside a Apacahe Tomcat server a JRE 32.
GWT 2.0.4

Any browser.

Give a Detailed description of the problem.  If possible, please include
some code that reproduces the problem and a verbatim copy of any error
messages you can find.

When I try to display a pie using the corechart package I get the message 
"Object Expected". It happens if I use the GWT-Visualization 1.1.1, or if I use 
the 1.1.0 with the string "piechart".

I'm able to run this HelloVisualization Example of visualization 1.1.1. But I 
when I try compile exactly the same example I'm getting the Object Expected 
message.

Workaround if you have one: I don't have any workaround

Links to the relevant Google Group posts:

Original issue reported on code.google.com by omer...@gmail.com on 6 Feb 2011 at 3:49

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Omer, this occurs also im my project (gwt and smartgwt project),issue 425, 
426,
in other words
com.google.gwt.visualization.client.visualizations.PieChart integrated in 
smartwgt work fine
but
com.google.gwt.visualization.client.visualizations.corechart.PieChart
don't work,

regards

Original comment by vlui...@tiscali.it on 6 Feb 2011 at 9:18

GoogleCodeExporter commented 9 years ago
Yes, that's my problem.
Any one has any workaround?

Thanks,

Original comment by omer...@gmail.com on 10 Feb 2011 at 2:31

GoogleCodeExporter commented 9 years ago
You cannot use the string 'piechart' with the newer functionality.  Use 
'corechart' instead.

Original comment by zundel@google.com on 10 Feb 2011 at 2:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I am having the same issue. I am using the corechart with smartgwt. Below is 
the alone code I am using with smartgwt & gwt-visualization.jar 1.1.1 
integration. I copied most of the code from gwt visualization 1.1.1 examples. 
This seems like an issue with visualization api and there seems to be no work 
around?

ERROR:

Uncaught exception escaped : com.google.gwt.core.client.JavaScriptException
(TypeError): Cannot read property 'returnValue' of undefined
 stack: TypeError: Cannot read property 'returnValue' of undefined
    at anonymous (eval at <anonymous> (http://127.0.0.1:8888/myproject/sc/modules/ISC_Core.js:38:72))
    at http://www.google.com/uds/api/visualization/1.0/ff143b01fadc35fa0f4657e99bad401b/default,table,corechart.I.js:140:1
    at unknown source
    at unknown source
    at __gwt_jsInvoke (http://127.0.0.1:8888/myproject/hosted.html?myproject:76:35)
    at eval at <anonymous> (http://127.0.0.1:8888/myproject/hosted.html?myproject:54:12)
    at unknown source
 type: non_object_property_load
 arguments: returnValue,
 __gwt_ObjectId: 20
See the Development console log for details.
Register a GWT.setUncaughtExceptionHandler(..) for custom uncaught exception 
handling.

CODE:

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.visualization.client.DataTable;
import com.google.gwt.visualization.client.VisualizationUtils;
import com.google.gwt.visualization.client.AbstractDataTable.ColumnType;
import com.google.gwt.visualization.client.visualizations.Table;
import com.google.gwt.visualization.client.visualizations.corechart.PieChart;

public class MyProject implements EntryPoint {

    public void onModuleLoad() {

        VisualizationUtils.loadVisualizationApi(new Runnable() {
              public void run() {
                RootPanel.get().add(createPieChart());
              }}, PieChart.PACKAGE);

    }

  private Widget createPieChart() {
        /* create a datatable */
        DataTable data = DataTable.create();
        data.addColumn(ColumnType.STRING, "Task");
        data.addColumn(ColumnType.NUMBER, "Hours per Day");
        data.addRows(5);
        data.setValue(0, 0, "Work");
        data.setValue(0, 1, 11);
        data.setValue(1, 0, "Eat");
        data.setValue(1, 1, 2);
        data.setValue(2, 0, "Commute");
        data.setValue(2, 1, 2);
        data.setValue(3, 0, "Watch TV");
        data.setValue(3, 1, 2);
        data.setValue(4, 0, "Sleep");
        data.setValue(4, 1, 7);

        /* create pie chart */

        PieChart.PieOptions options = PieChart.createPieOptions();
        options.setWidth(400);
        options.setHeight(240);
        options.set3D(true);
        options.setTitle("My Daily Activities");
        return new PieChart(data, options);
      }
}

Original comment by kaushik...@gmail.com on 18 Feb 2011 at 4:08

GoogleCodeExporter commented 9 years ago
smartgwt users, there has been an update to the smartgwt project that might 
help you: see http://code.google.com/p/smartgwt/issues/detail?id=405

Original comment by zundel@google.com on 4 Mar 2011 at 6:56

GoogleCodeExporter commented 9 years ago

Original comment by zundel@google.com on 4 Mar 2011 at 6:57

GoogleCodeExporter commented 9 years ago
The problem seems to be solved using latest nightly build from smartgwt.

Original comment by kaushik...@gmail.com on 7 Mar 2011 at 10:53