Awesome, ty. I'm new at this, and it's very relieving to get confirmation that it wasn't a problem in my code. My workaround is fine for now, but if this is fixed in the underlying code that'd be great.
thanks, On Jun 6, 6:13 am, MC Get Vizzy <[email protected]> wrote: > Yes, you're right, it seems to be related to the cross-domain issue. > google.visualization.Query acts differently for cross-domain queries. > Since the response is JSONP and not real JSON, it does not convert the JSON > date strings into Date objects. This behavior is indeed problematic, so > I'll see if it can be fixed. > > thanks, > > MC Get Vizzy > > > > > > > > On Sun, Jun 5, 2011 at 6:20 PM, NA <[email protected]> wrote: > > I print the result of PHP's file_get_contents. Specifically, I have: > > > - Google Chart Javascript lives onhttp://serverA.com > > - Web page onhttp://serverB.comcontains the code: <?php echo > > file_get_contents('http://serverA.com');?> > > > Viewing the page directly by visiting serverA works perfectly. But > > when I view the page on serverB, I consistently get this error. > > > I assume it's something to do with the cross server call, but I don't > > understand what about the request would cause this. > > > On Jun 5, 10:18 am, MC Get Vizzy <[email protected]> wrote: > > > How does your script get called from other websites? > > > > On Sat, Jun 4, 2011 at 7:19 PM, NA <[email protected]> wrote: > > > > FWIW, my workaround is: > > > > > function MassageTable(dataTable,ColumnIDMap) { > > > > var dateCol = ColumnIDMap['timebin']; // your date column id > > should > > > > be defined here > > > > for (var i=0;i<dataTable.getNumberOfRows();i++) { > > > > dateVal = dataTable.getValue(i,dateCol); > > > > // If it's already a date, do nothing > > > > if (dateVal instanceof Date) {continue;} > > > > evalStr = 'new ' + dateVal; > > > > newDate = eval(evalStr); > > > > dataTable.setValue(i,dateCol,newDate); > > > > } > > > > return dataTable; > > > > } > > > > > On Jun 2, 2:53 pm, NA <[email protected]> wrote: > > > > > Hi, > > > > > > I get the error below when using datetimes. Any idea what causes > > > > > this? > > > > > > Uncaught Error: Type mismatch. Value Date(2011,5,1,14,0,0) does not > > > > > match type datetime in column index 0 > > > > > > This should be a valid datetime. In fact, I have been using Date > > > > > objects like this and haven't seen this error before. It only > > happens > > > > > when my script for producing charts is called from within another > > > > > website. When the script is called directly, there is no error. > > > > > > Any ideas? > > > > > -- > > > > 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. > > > -- > > 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. -- 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.
