Hi Sheldon,
We have an internal
LayoutManager class that handles laying out of blocks. However, it currently
hardcodes the layouts of the blocks. It should however be able to handle nested
blocks. Can you try adding the timestamp block to the plot? You can further
specify positions using the ‘bounds’, ‘anchor’ and ‘insets’
attributes of the block. If these are not automatically supported, please
submit a bugzilla entry for the same.
Thanks,
Milind
From:
birt-charting-dev-bounces@xxxxxxxxxxx [mailto:birt-charting-dev-bounces@xxxxxxxxxxx]
On Behalf Of Sheldon Lee-Loy
Sent: Thursday, July 07, 2005
12:02 PM
To: birt-charting-dev@xxxxxxxxxxx
Subject: [birt-charting-dev]
Supporting timestamp
I was looking at the APIs. From what I gather you
can add blocks to the model. These block can be added the chart
"block". Therefore to render a timestamp I add the following to
the chart model:
ChartWithAxes cwaBar = ChartWithAxesImpl.create();
//Create
timestamp label block
LabelBlock timestamp = (LabelBlock)LabelBlockImpl.create();
Label label = LabelImpl.create();
Text text = TextImpl.create(SimpleDateFormat.getInstance().format(Calendar.getInstance().getTime()));
label.setCaption(text);
timestamp.setLabel(label);
//Add
timestamp to the chart model
cwaBar.getBlock().getChildren().add(timestamp);
I
was able to see the timestamp however, the timestamp is displayed in the top
right corner. Is there a way to layout the timestamp. Are there any
layout classes?
In
terms of supporting timestamp features such as date formatting I guess I could
extend the LabelBlockImpl class to add specific timestamp attributes for our
needs.
Thanks,
Sheldon
______________________________________
Sheldon Lee-Loy
Problem Deterministic Group, IBM Toronto Lab
email: sleeloy@xxxxxxxxxx
phone: 905.413.2610