22 messages in com.googlegroups.google-visualization-api[visualization-api] Re: Date for anno...| From | Sent On | Attachments |
|---|---|---|
| Jeremiah Elliott | 12 Jun 2008 12:06 | |
| VizGuy (Google) | 15 Jun 2008 04:40 | |
| Jason | 17 Jun 2008 11:39 | |
| Jeremiah Elliott | 17 Jun 2008 14:51 | |
| Jason | 17 Jun 2008 19:34 | |
| Jeremiah Elliott | 18 Jun 2008 07:18 | |
| Jason Brechin | 18 Jun 2008 07:33 | |
| Jeremiah Elliott | 18 Jun 2008 07:43 | |
| Google VizGuy | 24 Jun 2008 03:38 | |
| Jeremiah Elliott | 24 Jun 2008 06:04 | |
| shayne (mabulu) | 26 Jun 2008 23:13 | |
| shayne (mabulu) | 26 Jun 2008 23:13 | |
| Jeremiah Elliott | 27 Jun 2008 06:06 | |
| Jeremiah Elliott | 27 Jun 2008 06:27 | |
| Jason Brechin | 27 Jun 2008 07:50 | |
| Uwe Maurer | 01 Jul 2008 09:43 | |
| shayne (mabulu) | 01 Jul 2008 09:56 | |
| Uwe Maurer | 01 Jul 2008 12:07 | |
| Jeremiah Elliott | 15 Jul 2008 11:04 | .html, .java, .html |
| Ray Cromwell | 15 Jul 2008 11:13 | |
| Ray Cromwell | 15 Jul 2008 11:16 | |
| Jeremiah Elliott | 15 Jul 2008 12:27 |
| Subject: | [visualization-api] Re: Date for annotated time line![]() |
|---|---|
| From: | Jason Brechin (brec...@gmail.com) |
| Date: | 06/27/2008 07:50:57 AM |
| List: | com.googlegroups.google-visualization-api |
That makes sense, since the Java Date object has more information in it than the JS Date object seems to have. I've never used the GWT before, so I'm not sure how to work around this.
On Fri, Jun 27, 2008 at 8:28 AM, Jeremiah Elliott <jere...@gmail.com> wrote:
The other issue I am having is that I am by no means a javascript expert. I guess what is happening is that the jsni new Date() doesnt' create the same object as a javascript new Date(), but i dont' know how to prove this.
On Fri, Jun 27, 2008 at 8:06 AM, Jeremiah Elliott <jere...@gmail.com> wrote:
I think its a bug too, but am unsure if its a gwt bug or a visualization bug. What version of gwt are you using? I am using 1.5.0
On Fri, Jun 27, 2008 at 1:13 AM, shayne (mabulu) <shay...@gmail.com>
wrote:
I'm having the same problem. The following won't work in GWT:
data = new $wnd.google.visualization.DataTable(); data.addColumn('date', 'Date'); data.addRows(1); data.setValue(0, 0, new Date());
I get:
com.google.gwt.core.client.JavaScriptException: (Error): Type mismatch. Value Mon Jan 01 2007 02:12:48 GMT-0500 (EST) does not match type date in column index 0
I'm thinking it's a bug. Anyone else have any insight?
On Jun 24, 9:04 am, "Jeremiah Elliott" <jere...@gmail.com> wrote:
Yes, someone else already pointed that out and I have fixed it, could the problem be that this is a jsni method in a gwt app?
On Tue, Jun 24, 2008 at 5:38 AM, Google VizGuy <viz...@google.com>
wrote:
TheDatecreation seems fine. However, when I look into your code, I see that you created the column as type 'string': data.addColumn('string', 'Date'); The type should be 'date' or 'datetime'
On Wed, Jun 18, 2008 at 5:43 PM, Jeremiah Elliott < jere...@gmail.com> wrote:
var year = 2008; var month = 5; var day = 22; var d = newDate(year, month, day); data.setValue(row, col, d );
On Wed, Jun 18, 2008 at 9:33 AM, Jason Brechin <brec...@gmail.com>
wrote:
I think the docs state that you can only use adateordate/time object, corresponding to 'date' or 'datetime' types. How are you creating your Date objects? Can you post the code you're using?
On Wed, Jun 18, 2008 at 9:19 AM, Jeremiah Elliott < jere...@gmail.com> wrote:
I changed the type todateas recommended, however the error persists. Only now the error says:
com.google.gwt.core.client.JavaScriptException: (Error): Type mismatch. Value Sun Jun 22 2008 00:00:00 GMT-0500 (CDT) does not match typedatein column index 0
Is the problem that the DataTable datetype is expecting adate without the time / timezone?
On Tue, Jun 17, 2008 at 9:34 PM, Jason <brec...@gmail.com>
wrote:
Oh!
Your line "data.addColumn('string', 'Date');" should not use 'string', but 'date'.
It should be: data.addColumn('date', 'Date');
On Jun 17, 4:51 pm, "Jeremiah Elliott" <jere...@gmail.com>
wrote:
I am actually using this from a GWT app, using jsni. I am using the Table, PieChart, BarChart, and IntensityMap just fine, however the annotatedTimeLine is acting really strange. As you can see, I have removed almost any useful data and replaced it with hard coded values while debugging
native void getTimeLineVisual(Report rpt, Element element) /*-{ if(!$wnd.google && !wnd.google.visualisation){ return; } var rows = r....@com.sagus.client.pojo.Report::getRowCount()(); var cols = r....@com.sagus.client.pojo.Report::getColCount()(); var rpt_name = "default name"; rpt_name = r....@com.sagus.client.pojo.Report::getName()(); var data = new $wnd.google.visualization.DataTable(); data.addColumn('string', 'Date'); //Write the "headings" for(col = 1; col < cols ; col ++){ data.addColumn('number', r....@com.sagus.client.pojo.Report::getHeading(I)(col)); } // set the number of rows data.addRows(rows); //load the data
for (row = 0; row < rows; row++){ for (col = 0; col < cols; col++){ if (col == 0){
data.setValue(row, col, newDate(2008, 3, 5)); } else { var val = 6000;
//if(isNaN(val)){
val
= 0.0; //}
data.setValue(row,col, val); } } } var chart = new $wnd.google.visualization.AnnotatedTimeLine(element); chart.draw(data, {width: 700, height: 340, is3D: true, title: rpt_name}); }-*/;
Here is the stacktrace: Uncaught exception: com.google.gwt.core.client.JavaScriptException: (Error): Type mismatch. Value Sat Apr 05 2008 00:00:00 GMT-0500 (CDT) does not match type string in column index 0 fileName: lineNumber: 0 stack: Error("Type mismatch. Value Sat Apr 05 2008 00:00:00 GMT-0500 (CDT) does not match type string in column index 0")@:0 (0,[object
Date])@ http://www.google.com/uds/api/visualization/1.0/default/22f806c6f85c4... (0,0,[object
Date])@ http://www.google.com/uds/api/visualization/1.0/default/22f806c6f85c4... ([object gwt_nativewrapper_class],[object
HTMLDivElement])@file:/home/geek/workspace/sgDash/src/com/sagus/client/TabFreeDrill.java:623
private void
com.google.gwt.http.client.Request.fireOnResponseReceived(com.google.gwt.http.client.RequestCallback)([object
gwt_nativewrapper_class])@:0
()@jar:file:/home/geek/lib/gwt-linux-1.5.0/gwt-user.jar!/com/google/gwt/http/client/XMLHTTPRequest.java:253
@:0 : at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:443)
com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:235)
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
com.sagus.client.TabFreeDrill.getTimeLineVisual(TabFreeDrill.java)
com.sagus.client.TabFreeDrill$5.onSuccess(TabFreeDrill.java:262)
com.sagus.client.TabFreeDrill$5.onSuccess(TabFreeDrill.java:1)
On Tue, Jun 17, 2008 at 1:40 PM, Jason <brec...@gmail.com>
wrote:
I'm not sure exactly what you're asking for, but you can generate dates like this:
August 10, 2008 - newDate( 2008, 7, 10 );
January 1, 1990 - newDate( 1990, 0, 1 );
Does that help?
- Jason
On Jun 12, 2:07 pm, "Jeremiah Elliott" <jere...@gmail.com
wrote:
I am having issues getting the annotedtimeline working. In the example, it does a data.setValue(x,x,newDate(yyyy, mm dd));
However when I do this, I get a javascript error: Type mismatch. Value Sun Feb 03 2008 00:00:00 GMT-0600 (CST) does not match typedatein column index 0
now, i am _not_ a javascript guru at all, but to me this means that it is expecting adate, not adate/time/zone.
is that correct? and if so how do i generate adatethat is _only_ a datewithout the time and timezone?
-Jeremiah
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to goog...@googlegroups.com
To unsubscribe from this group, send email to
goog...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---





.html, .java, .html