You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/01/25 20:39:47 UTC

[GitHub] [superset] altef opened a new issue #12745: Download-as-image doesn't seem to work for map-type charts

altef opened a new issue #12745:
URL: https://github.com/apache/superset/issues/12745


   "Download as image" doesn't do anything for map-type charts (or dashboards that contain them).  I traced this back to unencoded SVG as the background attribute of the mapbox logo.  When that's accounted for, images are created but not as expected.  Some are missing the data points, and all seem to be missing the map itself.
   
   ### Expected results
   
   An image download of the chart, as seen in the browser.
   
   ### Actual results
   
   No image download; or, an image with a blank spot for that chart.
   
   #### Screenshots
   Expected:
   ![image](https://user-images.githubusercontent.com/4316295/105762089-cab26c80-5f08-11eb-8ae9-a1cad42a4cbf.png)
   
   Actual:
   ![image](https://user-images.githubusercontent.com/4316295/105762179-ea499500-5f08-11eb-9258-47e2d2a1e39f.png)
   
   
   #### How to reproduce the bug
   
   1. Make a chart using any of the map visualizations
   2. Click on '...'
   3. Click **Download as image**
   4. See error
   
   ### Environment
   
   - superset version: 1.0
   - python version: 3.7.9
   - node.js version: 13.11.0
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   Slack thread here: https://apache-superset.slack.com/archives/C7G8CG0LR/p1611320721049400?thread_ts=1611267512.027300&cid=C7G8CG0LR
   
   As noted, i traced the initial error back to Mapbox's logo – its background is a data-url with SVG in it, and so it contains the character `<`, which causes all sorts of problems.  I made two changes to `superset-frontend/src/utils/downloadAsImage.ts` locally to circumvent that:
   
   * `filter: (node:Element) => { return node.className !== 'mapboxgl-ctrl-logo'; }`, filters out the mapbox logo based on its classname.
   * `.catch(function (error) {` I added a catch, so that when and if it does fail, it doesn't break the menu with a forsaken promise.
   
   Which leaves my file looking like:
   
   ```typescript
   return domToImage
         .toJpeg(elementToPrint, {
           quality: 0.95,
           bgcolor: GRAY_BACKGROUND_COLOR,
           filter: (node:Element) => { return node.className !== 'mapboxgl-ctrl-logo'; },
           ...domToImageOptions,
         })
         .then(dataUrl => {
           const link = document.createElement('a');
           link.download = `${generateFileStem(description)}.jpg`;
           link.href = dataUrl;
           link.click();
         })
         .catch(function (error) {
           console.error('Error creating image', error);
         });
   ```
   
   I tested the download with a view of the map types, with the following results:
   * Mapbox - shows datapoints, but not map
   * deck.gl scatterplot - shows neither
   * deck.gl screen grid - shows neither


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] junlincc edited a comment on issue #12745: Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-767129619


   Thanks for reporting!is this issue blocking your work in Superset currently? Please help us identify the severity. @altef 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] junlincc commented on issue #12745: [explore]Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-770427473


    still working on it, we had to transfer ticket ownership. should be fixed next week. 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] altef commented on issue #12745: [explore]Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
altef commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-780728277


   😀 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] abdulshehata commented on issue #12745: Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
abdulshehata commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-767160752


   I'd say moderate to high severity. It creates a client-facing issue for us in that all of our dashboards have maps and it's currently a requirement for users of the dashboards to be able to download images. Our user base has been waiting on this feature, and as such we can't roll out V1.0 until the issue is resolved.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] kgabryje commented on issue #12745: [explore]Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
kgabryje commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-780721268


   Hey @altef, thank you for your patience, PRs https://github.com/apache/superset/pull/13181, https://github.com/apache-superset/superset-ui/pull/965 and https://github.com/apache-superset/superset-ui-plugins-deckgl/pull/25 should fix this issue.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] altef commented on issue #12745: [explore]Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
altef commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-780062151


   Any updates on this? (I've been told to ask)


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rusackas commented on issue #12745: [explore]Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
rusackas commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-768095101


   Thanks for the detailed reporting and inroads on a fix! 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] abdulshehata commented on issue #12745: Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
abdulshehata commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-767160752


   I'd say moderate to high severity. It creates a client-facing issue for us in that all of our dashboards have maps and it's currently a requirement for users of the dashboards to be able to download images. Our user base has been waiting on this feature, and as such we can't roll out V1.0 until the issue is resolved.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] junlincc edited a comment on issue #12745: [explore]Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-770427473


    still working on it, we had to transfer ticket ownership. should be fixed by next week. 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] altef commented on issue #12745: Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
altef commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-767136348


     I know we were hoping to make use of this feature; @abdulshehata can better answer this!


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] junlincc commented on issue #12745: Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-767129619


   Thanks for reporting!is this issue blocking your work in Superset currently? Please help us identify the severity.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] junlincc commented on issue #12745: Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-767129619


   Thanks for reporting!is this issue blocking your work in Superset currently? Please help us identify the severity.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] junlincc commented on issue #12745: [explore]Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-786425929


   confirmed issue has been resolved in master, fix will be available in next release


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] junlincc closed issue #12745: [explore]Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
junlincc closed issue #12745:
URL: https://github.com/apache/superset/issues/12745


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] junlincc edited a comment on issue #12745: [explore]Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-786425929


   confirmed issue has been resolved in master, fix will be available in next release. thank you @kgabryje 🙏


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] altef commented on issue #12745: Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
altef commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-767136348


     I know we were hoping to make use of this feature; @abdulshehata can better answer this!


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] eugeniamz commented on issue #12745: Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
eugeniamz commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-767128351


   @junlincc 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] junlincc edited a comment on issue #12745: Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-767129619


   Thanks for reporting!is this issue blocking your work in Superset currently? Please help us identify the severity. @altef 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] eugeniamz commented on issue #12745: Download-as-image doesn't seem to work for map-type charts

Posted by GitBox <gi...@apache.org>.
eugeniamz commented on issue #12745:
URL: https://github.com/apache/superset/issues/12745#issuecomment-767128351


   @junlincc 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org