ohohyea opened a new issue #9260: 自定义的工具的icon如果类似"image://http://echarts.baidu.com/images/favicon.png",此时不能导出图表 URL: https://github.com/apache/incubator-echarts/issues/9260 <!-- 为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。 --> ### One-line summary [问题简述] 自定义的工具的icon如果类似"image://http://echarts.baidu.com/images/favicon.png",此时不能导出图表,按钮saveAsImage和mychart.getDataURL()报错,浏览器控制台异常:Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be 如果为相对路径"image:///images/favicon.png",则没有问题。 ### Version & Environment [版本及环境] + ECharts version [ECharts 版本]:4.1.0 + Browser version [浏览器类型和版本]:Chrome,IE11 + OS Version [操作系统类型和版本]:windows10 ### Expected behaviour [期望结果] ### ECharts option [ECharts配置项] <!-- Copy and paste your 'echarts option' here. --> <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] --> ```javascript var option ={ toolbox: { feature: {myTool1: { icon: "image://http://echarts.baidu.com/images/favicon.png", // icon: 'path://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z M421.155,589.876c-3.009,0-5.448,2.495-5.448,5.572s2.439,5.572,5.448,5.572c3.01,0,5.449-2.495,5.449-5.572C426.604,592.371,424.165,589.876,421.155,589.876L421.155,589.876z M421.146,591.891c-1.916,0-3.47,1.589-3.47,3.549c0,1.959,1.554,3.548,3.47,3.548s3.469-1.589,3.469-3.548C424.614,593.479,423.062,591.891,421.146,591.891L421.146,591.891zM421.146,591.891', }, saveAsImage:{} }} }; ``` ### Other comments [其他信息] <!-- For example: Screenshot or Online demo --> <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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]
