vnourdin commented on a change in pull request #13157:
URL: https://github.com/apache/superset/pull/13157#discussion_r578349478



##########
File path: superset/utils/screenshots.py
##########
@@ -195,12 +195,34 @@ def resize_image(
 class ChartScreenshot(BaseScreenshot):
     thumbnail_type: str = "chart"
     element: str = "chart-container"
-    window_size: WindowSize = (800, 600)
-    thumb_size: WindowSize = (800, 600)
+
+    def __init__(
+        self,
+        url: str,
+        digest: str,
+        window_size: Optional[WindowSize] = None,
+        thumb_size: Optional[WindowSize] = None,
+    ):
+        super().__init__(url, digest)
+        self.window_size = (
+            window_size or current_app.config["WEBDRIVER_WINDOW"]["slice"]
+        )
+        self.thumb_size = thumb_size or (800, 600)

Review comment:
       OK, thanks :ok_hand: 




----------------------------------------------------------------
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.

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