Re: [visualization-api] com.google.visualization.datasource.datatable.TableRow
I'm confused. Your first statement said that it worked, and then your second statement said that it did not work. Looking at the code, it doesn't seem like you have to go through all of that. You should be able to just do new DateValue(year, month, day). On Thu, Apr 30, 2015 at 2:21 PM da angusd...@gmail.com wrote: Sergey, I tried that and it worked! import com.ibm.icu.util.GregorianCalendar; import com.ibm.icu.util.TimeZone; ... GregorianCalendar cal = new GregorianCalendar(); cal.setTime(new Date()); cal.setTimeZone(TimeZone.getTimeZone(GMT)); row.addCell(new DateValue(cal)); Note: The row.addCell does not work when using java.util.GregoricanCalendar. See import statements. Thank you! On Thursday, April 30, 2015 at 10:44:43 AM UTC-7, Sergey wrote: No, I'm saying that you would leave the ValueType as it is (as DATE), and use the Date String representation. As far as I can tell, the table doesn't do any type checking. However, it also looks like there's a com.google.visualization.datasource.datatable.value.DateValue. Is there a reason you're not using that? -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] com.google.visualization.datasource.datatable.TableRow
It sounds like you're using the Java DataSource library. You should try the Date String representation outlined here: https://developers.google.com/chart/interactive/docs/datesandtimes#datestring On Thu, Apr 30, 2015 at 1:10 PM da angusd...@gmail.com wrote: How do I get this work? ColumnDescription columnDescription = new ColumnDescription( countDate, ValueType.DATE, Count Date); ... Date someDate = new Date(); row.addCell(someDate); Compiler complains that The method addCell(TableCell) in the type TableRow is not applicable for the arguments (Date) Why does ColumnDescription allow ValueType.DATE but the row.addCell() does not allow dates? Thanks. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] com.google.visualization.datasource.datatable.TableRow
No, I'm saying that you would leave the ValueType as it is (as DATE), and use the Date String representation. As far as I can tell, the table doesn't do any type checking. However, it also looks like there's a com.google.visualization.datasource.datatable.value.DateValue. Is there a reason you're not using that? On Thu, Apr 30, 2015 at 1:38 PM da angusd...@gmail.com wrote: HI Sergey, I understand the Date String representation. BUT The means that I have to do this ColumnDescription columnDescription = new ColumnDescription( countDate, ValueType.*TEXT*, Count Date); The result is that the JSON returned will have [{id:countDate,label:Count Date,type:*string* ,pattern:},... DateRangeFilter will not work, and many other things may not work when expecting a type of date. On Thursday, April 30, 2015 at 10:28:30 AM UTC-7, Sergey wrote: It sounds like you're using the Java DataSource library. You should try the Date String representation outlined here: https://developers.google.com/chart/interactive/docs/datesandtimes#datestring On Thu, Apr 30, 2015 at 1:10 PM da angu...@gmail.com wrote: How do I get this work? ColumnDescription columnDescription = new ColumnDescription( countDate, ValueType.DATE, Count Date); ... Date someDate = new Date(); row.addCell(someDate); Compiler complains that The method addCell(TableCell) in the type TableRow is not applicable for the arguments (Date) Why does ColumnDescription allow ValueType.DATE but the row.addCell() does not allow dates? Thanks. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] com.google.visualization.datasource.datatable.TableRow
HI Sergey, I understand the Date String representation. BUT The means that I have to do this ColumnDescription columnDescription = new ColumnDescription( countDate, ValueType.*TEXT*, Count Date); The result is that the JSON returned will have [{id:countDate,label:Count Date,type:*string*,pattern:},... DateRangeFilter will not work, and many other things may not work when expecting a type of date. On Thursday, April 30, 2015 at 10:28:30 AM UTC-7, Sergey wrote: It sounds like you're using the Java DataSource library. You should try the Date String representation outlined here: https://developers.google.com/chart/interactive/docs/datesandtimes#datestring On Thu, Apr 30, 2015 at 1:10 PM da angu...@gmail.com javascript: wrote: How do I get this work? ColumnDescription columnDescription = new ColumnDescription( countDate, ValueType.DATE, Count Date); ... Date someDate = new Date(); row.addCell(someDate); Compiler complains that The method addCell(TableCell) in the type TableRow is not applicable for the arguments (Date) Why does ColumnDescription allow ValueType.DATE but the row.addCell() does not allow dates? Thanks. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] com.google.visualization.datasource.datatable.TableRow
Sergey, I tried that and it worked! import com.ibm.icu.util.GregorianCalendar; import com.ibm.icu.util.TimeZone; ... GregorianCalendar cal = new GregorianCalendar(); cal.setTime(new Date()); cal.setTimeZone(TimeZone.getTimeZone(GMT)); row.addCell(new DateValue(cal)); Note: The row.addCell does not work when using java.util.GregoricanCalendar. See import statements. Thank you! On Thursday, April 30, 2015 at 10:44:43 AM UTC-7, Sergey wrote: No, I'm saying that you would leave the ValueType as it is (as DATE), and use the Date String representation. As far as I can tell, the table doesn't do any type checking. However, it also looks like there's a com.google.visualization.datasource.datatable.value.DateValue. Is there a reason you're not using that? -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] com.google.visualization.datasource.datatable.TableRow
Ah yes, that's the GregorianCalendar that DateValue depends on. I'm sure there are historical reasons for this. It's possible that com.ibm.icu.util.GregorianCalendar had better behavior. An alternative explanation may be that the DataSource library predates Java 7, which is when java.util.GregorianCalendar appears to have been introduced. On Thu, Apr 30, 2015 at 2:57 PM da angusd...@gmail.com wrote: I was not able to get it to work using java.util.GregoricanCalendar. But somehow works with com.ibm.icu.util.GregorianCalendar; I needed to write all that for my code. I just simplified the example below. On Thursday, April 30, 2015 at 11:39:26 AM UTC-7, Sergey wrote: I'm confused. Your first statement said that it worked, and then your second statement said that it did not work. Looking at the code, it doesn't seem like you have to go through all of that. You should be able to just do new DateValue(year, month, day). On Thu, Apr 30, 2015 at 2:21 PM da angu...@gmail.com wrote: Sergey, I tried that and it worked! import com.ibm.icu.util.GregorianCalendar; import com.ibm.icu.util.TimeZone; ... GregorianCalendar cal = new GregorianCalendar(); cal.setTime(new Date()); cal.setTimeZone(TimeZone.getTimeZone(GMT)); row.addCell(new DateValue(cal)); Note: The row.addCell does not work when using java.util.GregoricanCalendar. See import statements. Thank you! -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] com.google.visualization.datasource.datatable.TableRow
I was not able to get it to work using java.util.GregoricanCalendar. But somehow works with com.ibm.icu.util.GregorianCalendar; I needed to write all that for my code. I just simplified the example below. On Thursday, April 30, 2015 at 11:39:26 AM UTC-7, Sergey wrote: I'm confused. Your first statement said that it worked, and then your second statement said that it did not work. Looking at the code, it doesn't seem like you have to go through all of that. You should be able to just do new DateValue(year, month, day). On Thu, Apr 30, 2015 at 2:21 PM da angu...@gmail.com javascript: wrote: Sergey, I tried that and it worked! import com.ibm.icu.util.GregorianCalendar; import com.ibm.icu.util.TimeZone; ... GregorianCalendar cal = new GregorianCalendar(); cal.setTime(new Date()); cal.setTimeZone(TimeZone.getTimeZone(GMT)); row.addCell(new DateValue(cal)); Note: The row.addCell does not work when using java.util.GregoricanCalendar. See import statements. Thank you! -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] com.google.visualization.datasource.datatable.TableRow
My site looks better using the type Date instead of Text. :) http://etfchecker.com/wordpress/ Thanks, again. On Thursday, April 30, 2015 at 12:16:05 PM UTC-7, Sergey wrote: Ah yes, that's the GregorianCalendar that DateValue depends on. I'm sure there are historical reasons for this. It's possible that com.ibm.icu.util.GregorianCalendar had better behavior. An alternative explanation may be that the DataSource library predates Java 7, which is when java.util.GregorianCalendar appears to have been introduced. On Thu, Apr 30, 2015 at 2:57 PM da angu...@gmail.com javascript: wrote: I was not able to get it to work using java.util.GregoricanCalendar. But somehow works with com.ibm.icu.util.GregorianCalendar; I needed to write all that for my code. I just simplified the example below. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.