how to group data by month with non-SQL datasource [message #79859] |
Fri, 07 October 2005 13:53 |
Eclipse User |
|
|
|
I am creating a simple bar chart.
I have a y series which is numeric and an x series which is a timestamp.
I would like to be able to group the data by month, displaying the
name of the month as the x-axis values (e.g. January, February, ...)
I tried creating a computed column which was the result of calling
"getMonth()" on my timestamp column and then grouping on that column
with the type set to numeric and an interval of 1. That did what I
wanted with the exception that the value displayed on the x-axis was, of
course, a number (and I want the month name).
My next attempt was to set the grouping type to "Text" and then use
some javascript to convert my computed column from the number value to
the month name using java.text.DateFormatSymbols so that I could use the
month name as the group key. Unfortunately, that didn't work since my
only option with the grouping type set to "Text" is to set the interval
to some regular interval which won't work since every month doesn't have
the same number of rows.
Note that the Date/Time type for grouping appears to be unimplemented.
That would obviously have been my first choice. Perhaps it is
functional and I simply wasn't using it correctly? (examples?)
Note that I'm using a custom data source so solutions which do the work
in SQL won't work.
Any suggestions would be appreciated...
Thanks!
-James
|
|
|
Powered by
FUDForum. Page generated in 0.02323 seconds