Skip to main content



      Home
Home » Archived » BIRT » Chart width in '%' no longer allowed with BIRT 2.2.1?
Chart width in '%' no longer allowed with BIRT 2.2.1? [message #261004] Thu, 08 November 2007 23:57 Go to next message
Eclipse UserFriend
Back in BIRT 2.1.3 (at least with the RCP designer), I could set the chart
width to 100% and it would scale to fit its container.

Now I find with BIRT 2.2.1 using the Eclipse designer, '%' is not an
option for the width.

How do I create a chart that fills its container? Do I need to resort to
some JavaScript voodoo magic?

Cheers,
Pax.
Re: Chart width in '%' no longer allowed with BIRT 2.2.1? [message #261150 is a reply to message #261004] Mon, 12 November 2007 07:33 Go to previous messageGo to next message
Eclipse UserFriend
This is not supported, even in the previous version. Charts are generated as
images, and cannot be re-sized in the browser without being distorted and
loosing their imagemap mapping for tooltips and hyperlinks. So that's why
the % is no longer an option anymore, since it will break the chart in the
browser.

Thanks,

David

<allachan@au1.ibm.com> wrote in message
news:fh0pci$r8a$1@build.eclipse.org...
> Back in BIRT 2.1.3 (at least with the RCP designer), I could set the chart
> width to 100% and it would scale to fit its container.
>
> Now I find with BIRT 2.2.1 using the Eclipse designer, '%' is not an
> option for the width.
>
> How do I create a chart that fills its container? Do I need to resort to
> some JavaScript voodoo magic?
>
> Cheers,
> Pax.
>
Re: Chart width in '%' no longer allowed with BIRT 2.2.1? [message #261282 is a reply to message #261150] Mon, 12 November 2007 23:27 Go to previous messageGo to next message
Eclipse UserFriend
I understand that stretching the (very well) rendered charts could make
them as ugly as sin.

Is there a possibility of intercepting the report before the chart code
renders it (like changing datasource properties in beforeOpen) to change
the image properties based on the container?

For example, if we can detect that the chart is contained in a table cell
600x400 pixels, can the chart width be changed to 590x390 pixels before
its creation?

Some reports seem silly in that the tables stretch the entire width of the
screen but the charts have to be built for the minimum screen size.
Re: Chart width in '%' no longer allowed with BIRT 2.2.1? [message #261331 is a reply to message #261282] Tue, 13 November 2007 11:27 Go to previous message
Eclipse UserFriend
Yes, if you can find out the size you want to render at runtime.
Implement this in beforeFactory or beforeRender in the report script:

this.getReportElement("ChartItemName").setWidth("600pt");

Thanks,

David

<allachan@au1.ibm.com> wrote in message
news:fhb93p$jdj$1@build.eclipse.org...
>I understand that stretching the (very well) rendered charts could make
> them as ugly as sin.
>
> Is there a possibility of intercepting the report before the chart code
> renders it (like changing datasource properties in beforeOpen) to change
> the image properties based on the container?
>
> For example, if we can detect that the chart is contained in a table cell
> 600x400 pixels, can the chart width be changed to 590x390 pixels before
> its creation?
>
> Some reports seem silly in that the tables stretch the entire width of the
> screen but the charts have to be built for the minimum screen size.
>
Previous Topic:Mixed type in a column of "ANY" type
Next Topic:auto Increment Value showing 1.0,2.0 instead of 1,2
Goto Forum:
  


Current Time: Sat Jun 07 21:17:34 EDT 2025

Powered by FUDForum. Page generated in 0.04635 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top