Bar Chart on Scripted Datasource pb [message #161665] |
Wed, 17 May 2006 04:15  |
Eclipse User |
|
|
|
Hello,
I configured a scripted datasource and the associated datasets. My java
class is returning some series of splitted timestamps (year, month, day,
hour, minute) and sums to display.
As an example, let's say that I have 12 rows for the last hour splitted in
5 minutes parts (14h10/14h15, 14h15/14h20, ..., 15h05/15h10) which serve
as X series (row["HOUR"] + ":" + row["MINUTE"]) ; for each row a number is
given which would serve as Y series.
In the dataset preview, the rows are complete, but in the chart preview
(and data preview of the chart wizard) I only see the rows from
14h10/14h15 to 14h35/14h40 !
Why can't I see the whole dataset ? I have to say too that the Eclipse
preview isn't working. But that's probably because I could not find the
demo's classes repository in the viewer's directory to put my java class
(does anyone know anything about that ?)
More : I want to place a marker on the X axis to sho the beginning of the
hour (between 14h55/15h00 and 15h00/15h05) ; as it can be anywhere in the
chart and that any time lap could be considered, I wonder which value I
must give to position it.
More again : would it be possible to place the X labels between the bars
rather than below and centered on them ?
NB : I'm using BIRT RC1
Thanks for answering, Thomas.
|
|
|
|
Re: Bar Chart on Scripted Datasource pb [message #161672 is a reply to message #161665] |
Wed, 17 May 2006 04:33   |
Eclipse User |
|
|
|
Hi Thoma,s
The Chart Preview shows only a limited number of rows for performance
reasons. However you can modify that setting in Eclipse preferences (Report
Design->Chart->Max row number of data preview)
I don't understand your marker question, did you try the Markers dialog in
the chart builder. What's wrong with it?
It's not very clear why you would want the labels between the bars. If so,
one label would me missing on the right or left. You can try adding some
left (or right) inset in the Text Format dialog of the X Axis, but I don't
think it would give you a satisfying result though.
Thanks,
David
"Thomas Escolan" <thomas_escolan@yahoo.fr> wrote in message
news:b9c0894c148f6696f5a9c451584d6cae$1@www.eclipse.org...
> Hello,
>
> I configured a scripted datasource and the associated datasets. My java
> class is returning some series of splitted timestamps (year, month, day,
> hour, minute) and sums to display.
> As an example, let's say that I have 12 rows for the last hour splitted in
> 5 minutes parts (14h10/14h15, 14h15/14h20, ..., 15h05/15h10) which serve
> as X series (row["HOUR"] + ":" + row["MINUTE"]) ; for each row a number is
> given which would serve as Y series.
>
> In the dataset preview, the rows are complete, but in the chart preview
> (and data preview of the chart wizard) I only see the rows from
> 14h10/14h15 to 14h35/14h40 !
> Why can't I see the whole dataset ? I have to say too that the Eclipse
> preview isn't working. But that's probably because I could not find the
> demo's classes repository in the viewer's directory to put my java class
> (does anyone know anything about that ?)
>
> More : I want to place a marker on the X axis to sho the beginning of the
> hour (between 14h55/15h00 and 15h00/15h05) ; as it can be anywhere in the
> chart and that any time lap could be considered, I wonder which value I
> must give to position it.
> More again : would it be possible to place the X labels between the bars
> rather than below and centered on them ?
>
> NB : I'm using BIRT RC1
> Thanks for answering, Thomas.
>
|
|
|
|
|
|
|
|
Re: Bar Chart on Scripted Datasource pb [message #161999 is a reply to message #161771] |
Wed, 17 May 2006 13:14   |
Eclipse User |
|
|
|
Hi Thomas,
The X Axis marker will use the index of the category series as the value. So
if you use 3, it should plot it at the 3rd item. There is no String value
support, you can file an enhancement for that.
Hope this helps,
David
"Thomas Escolan" <thomas_escolan@yahoo.fr> wrote in message
news:b206163e7d4afedd27ac5b7aa90ddcbd$1@www.eclipse.org...
> Thank you, David, for your help,
>
> I did try the markers functionality but I guess this specially applies to
> numeric values. As I "said", My X series are labelled with texts ("14:10",
> "14:15", etc.) And the marker line is always at the beginning of the axis
> whjatever I tried on its properties.
> My series are supposed to be whatever a "last passed hour" would mean
> (from 23:45 to 01:40, from 17:00 to 17:55 and so on). So the perfect
> solution would be to set the marker's value to row["MINUTE"] = 0... but I
> could'nt succeed in this direction.
>
> Thomas.
>
|
|
|
|
|
|
|
|
|
Re: Bar Chart on Scripted Datasource pb [message #162217 is a reply to message #162022] |
Thu, 18 May 2006 04:45  |
Eclipse User |
|
|
|
SO,
This is what finally worked fine :
function beforeDrawDataPoint(dataPointHints, fill, context) {
if (dataPointHints.getBaseValue().endsWith(":00")) {
var chart = context.getChartInstance();
var marker = chart.getAxes().get(0).getMarkerLines().get(0);
marker.getValue().setValue(dataPointHints.getIndex());
}
}
To anyone interested,
|
|
|
Powered by
FUDForum. Page generated in 0.23507 seconds