wushenchao commented on a change in pull request #6973: add chart export png
URL: 
https://github.com/apache/incubator-superset/pull/6973#discussion_r265911324
 
 

 ##########
 File path: superset/assets/src/explore/exploreUtils.js
 ##########
 @@ -182,3 +183,24 @@ export function exportChart(formData, endpointType) {
   exploreForm.submit();
   document.body.removeChild(exploreForm);
 }
+
+export function exportChartPNG(title, index, divStr) {
+  const _canvas = document.querySelectorAll(divStr)[index];
+  const w = parseInt(window.getComputedStyle(_canvas).width);
+  const h = parseInt(window.getComputedStyle(_canvas).height);
+
+  const canvas = document.createElement('canvas');
 
 Review comment:
   There are one mistakes above and it will be ok after modification
   
   ![屏幕快照 2019-03-15 下午5 47 
49](https://user-images.githubusercontent.com/8774296/54422932-82419980-474a-11e9-93ab-a2227e96bf85.png)
   

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


With regards,
Apache Git Services

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

Reply via email to