fardin-developer opened a new pull request, #34233:
URL: https://github.com/apache/superset/pull/34233

   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   This PR resolves an issue where using the "Download as Image" option on a 
table chart or handlebar chart within a dashboard only captures the visible 
portion of the chart (i.e., the section within the scroll view), instead of the 
entire chart content. This results in incomplete image exports when the chart 
content exceeds the visible area.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <img width="1241" height="979" alt="Screenshot 2025-07-19 at 1 50 57 PM" 
src="https://github.com/user-attachments/assets/466f59f0-5b85-41a2-8f12-a107b572c9d4";
 />
   
   
   #### BEFORE
   The downloaded image only includes the part of the table that is visible 
within the dashboard scroll area.
   ![top-15-languages-spoken-at-home-2025-07-19T08-59-11 
312Z](https://github.com/user-attachments/assets/437677bf-6910-4884-8ba6-b0c2ed568454)
   
   
   #### AFTER
   The downloaded image now includes the full chart content, including data 
outside the visible scroll area.
   ![top-15-languages-spoken-at-home-2025-07-19T09-58-39 
690Z](https://github.com/user-attachments/assets/bacec3ee-6612-4dab-9f97-b8dbbe85939c)
   
   
   
   ### CHANGES
   
   - Introduced logic to **detect scrollable elements or descendants** within 
the chart.
   - If scrollable, the element is **cloned**, and styles are adjusted to:
     - Remove height constraints.
     - Make all content visible (including overflow).
     - Preserve the full scrollable area.
   - The cloned element is rendered **off-screen** to allow full-content 
rendering without affecting layout.
   - Used the adjusted element to generate the image via **`dom-to-image`**, 
capturing the **entire scrollable content**.
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to