Hi,
I want to display an annotated timeline from a csv file. I used the
example in the documentation as a guide. However, I am having trouble
with the date column. I specified in the servlet that the first column
is a date type, but I'm still unable to read and display it. Could you
tell me what else I have to do to specify that the csv file 1st column
is a date? Should I keep the column dates in csv file in a specific
format? Thank You.
Here's the servlet code:
DataTable dataTable = null;
ULocale requestLocale =
DataSourceHelper.getLocaleFromRequest(request);
try {
ColumnDescription cd=new ColumnDescription("start.date",
ValueType.DATE, "start.date");
ColumnDescription cd2=new ColumnDescription("y-value",
ValueType.NUMBER, "y-value");
List<ColumnDescription> ls=new ArrayList<ColumnDescription>();
ls.add(cd);
ls.add(cd2);
dataTable = CsvDataSourceHelper.read(reader, ls, true,
requestLocale);
} catch (IOException e) {
log.error("Couldn't read from url: " + url, e);
throw new DataSourceException(ReasonType.INVALID_REQUEST,
"Couldn't read from url: " + url);
}
return dataTable;
--
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.