Skip to Content
avatar image
Former Member

Resizeable charts when tables get shorter-Lumira Designer 2.0

I have a crosstab table and 2 doughnut charts directly underneath the table. I also have a filterpanel on the same page. When I filter the crosstab, it sometimes will shrink from 10 rows down to 1, as it should But then I am left with a huge amount of white space between the crosstab and the charts. Is there a way to make the charts get larger to fill in that white space? Or any other options to fill in that white space?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Jan 11 at 03:32 PM

    Hello Jay - I recommend looking at the properties on the crosstab - resize, etc. - see the SAP Help https://help.sap.com/viewer/4f58d91f03e441b68d3187e94be27df2/2.0.3.0/en-US/3baa16e872bc1014ae0faa81b0e91070.html

    If you could share some screen shots that will help.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Seems like anytime I filter on the crosstab, it will always shrink down to the rows needed to show. See screen shots below. Which I am ok with, just trying to figure out what to do with all the whitespace between the shrunk table and the chart.

  • Jan 11 at 03:45 PM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 11 at 03:54 PM

    Screen shots. 1st screen is OK. I have my crosstab, and the chart below.

    2nd screen shot, is when I filter and their is only 1 row on the crosstab showing. I have a lot of white space.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 05 at 09:05 PM

    Hi Jay, you could try something like this:

    var numberOfRows = DS_CROSSTAB.getMembers(dimension).length;
    var rowHeight = 15px;
    var crosstabHeight = (numberOfRows * rowHeight) + 25px;
    
    CROSSTAB.setHeight(crosstabHeight);
    CHART_1.setTopMargin(crosstabHeight);
    CHART_2.setTopMargin(crosstabHeight);

    Then put this in a function and call it whenever you apply a filter (or on the onResultSetChanged event of the crosstab datasource). You may have to play around with the rowHeight and the crosstabHeight (not sure how high the default crosstab header/rows are).

    Add comment
    10|10000 characters needed characters exceeded