Forum Discussion

Tim's avatar
Tim
Data Integration
04-04-2024

Export PivotTable to image crops the bottom row

See the bit in the red rectangle:

Sisense version L2023.11.0.387

We have "Full-Size Widget to Image Download" turned on.

My guess is it's a bug in the export procedure. Can anyone confirm? Any workaround?

6 Replies

Replies have been turned off for this discussion
  • Tim's avatar
    Tim
    Data Integration

    I have a solution: Put the code below in your dashboard script. It adjusts the height of the box that wraps around the PivotTable so that it doesn’t cut off the bottom row anymore.

    Sisense - please fix this in a future update? 

     

    //-------------------------------------------------------------------------------------------------

    //Fix problem where download-as-image crops off half of the bottom row of PivotTables

    //-------------------------------------------------------------------------------------------------

    dashboard.on

    (

         'widgetready', function (widget)

         {

              document.querySelectorAll('.pivot-scroller').forEach

                                    (

                                                                function(element)

                                                                {

                                                                               var currentHeight = parseInt(window.getComputedStyle(element).getPropertyValue('height'));

                                                                               element.style.height = (currentHeight + 50) + 'px';

                                                                }

                                    );

              document.querySelectorAll('.pivot-scroller__container').forEach

                                    (

                                                                function(element)

                                                                {

                                                                               var currentHeight = parseInt(window.getComputedStyle(element).getPropertyValue('height'));

                                                                               element.style.height = (currentHeight + 50) + 'px';

                                                                }

                                    );

         }

    );

  • Hello Tim,

    Thank you for reaching out.

    I would like to get to the bottom of this with you.

    What kind of export are you doing that has that behavior, and does the same thing happen with other Widgets? Do you know what version of the exporter you are using?

    • Tim's avatar
      Tim
      Data Integration

      Sure.

      "other Widgets?" - Yes. Any PivotTable. I created a new dashboard with a very simple PivotTable (no JavaScript, no formatting, only one data field) and found the same problem.

      "What kind of export" - Image. See picture below.

      "version of the exporter" - Screenshot from .../app/configuration/system below. We turned on the circled setting. I don't know any more about "version of the exporter".

       

      • DRay's avatar
        DRay
        Admin

        Hi Tim,

         If the Pivot view is cut on the dashboard itself, this could be the reason. For Pivot and Table widgets the image will include all of the columns that were rendered in the dashboard, not just the columns that were visible on the screen. Since Pivot can be set to have a really huge number of rows, we do limit the height by the visible container size during exporting