Chart width of 100%

allachanallachan Junior Member
edited December 31, 1969 in Designing Analytics Reports
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.

Comments

  • VirgilVirgil Administrator EM admin
    edited December 31, 1969
    Hi Pax,

    I understand that the percentage (%) feature was removed as a chart width and height option since it was causing a distorted image to be created and the interactivity (drill-down) features were not lining up correctly. The problem would surface when the browser width caused the grid, or table, to expand to fill the space, which would stretch the chart... long after it was generated for a specified width. I don't know of any way to force the chart width to match the container's width since the container width can change at the browser, however, there are ways to modify the chart width in script if you want to play with this some.

    Try this in the beforeFactory event on the report design

    var myparam = params["SizeParameter"]
    this.getReportElement("NewChart").setWidth(myparam+"pt");

    Virgil

    Virgil Dodson
    OpenText Analytics Developer Community
    https://forums.opentext.com/forums/categories/analytics

Sign In or Register to comment.