You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/01/20 01:53:06 UTC

[GitHub] [incubator-echarts] yaoguoba opened a new issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小

yaoguoba opened a new issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小
URL: https://github.com/apache/incubator-echarts/issues/12094
 
 
   ### What problem does this feature solve?
   1,当图标在隐藏tab下,图片宽度存在问题,虽然现在提供了resize方法设置图片大小,但是在导出图片时,我们并不想改变页面显示的图标大小,保留100%。
   2,如果打开动画,隐藏时导出图片会有问题。
   
   能够提供参数来设置图片大小而不影响页面显示,导出时单独渲染图片而不是依赖于页面中的图表?
   可以设置开关来提高性能,当图标非隐藏时,可以不单独渲染。
   
   ### What does the proposed API look like?
   echartsInstance. getDataURL(opts: {
       // 导出的格式,可选 png, jpeg
       type?: string,
       // 导出的图片分辨率比例,默认为 1。
       pixelRatio?: number,
       // 导出的图片背景色,默认使用 option 里的 backgroundColor
       backgroundColor?: string,
       // 忽略组件的列表,例如要忽略 toolbox 就是 ['toolbox']
       excludeComponents?: Array.<string>,
   
       // 宽度
       width?: number | string,
       // 高度
       height?: number | string,
       // 是否重新渲染
       reRenderFlag?: boolean
   }) => string
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] 100pah commented on issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小

Posted by GitBox <gi...@apache.org>.
100pah commented on issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小
URL: https://github.com/apache/incubator-echarts/issues/12094#issuecomment-580777728
 
 
   “在图表未能成功渲染时就导出图片” ,并未想到比较简单的办法。

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] yaoguoba commented on issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小

Posted by GitBox <gi...@apache.org>.
yaoguoba commented on issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小
URL: https://github.com/apache/incubator-echarts/issues/12094#issuecomment-576151046
 
 
   > 你好,没太明白你的需求,能详细描述下需要这样做的背景么?
   
   不是背景,我的页面上有个导出按钮,导出数据的同时要把图表也导出到文件中。
   目前我的做法是把图片已Base64形式传回API端,然后生成到文件中。
   
   但是,页面上是分数据视图和图表视图切换的,当数据视图时,也可以执行导出。
   此时,图表处于Display: none状态
   1、EChart获取不到宽度,所以默认设置为100px。
        虽然可以通过resize设置图片大小,但是同时把页面上的图表尺寸改了,我并不想修改。
        所以希望能在getDataURL时指定图片大小,跟页面上的图表大小无关。
   2、动画未执行,图表内容挤在一起

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] github-actions[bot] closed issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #12094:
URL: https://github.com/apache/echarts/issues/12094


   


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] 100pah edited a comment on issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小

Posted by GitBox <gi...@apache.org>.
100pah edited a comment on issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小
URL: https://github.com/apache/incubator-echarts/issues/12094#issuecomment-580777728
 
 
   “在图表未能成功渲染时就导出图片” ,并未想到比较简单的办法。
   是否可以试着,在点击导出图片的时候,先将 `display:none` 改为 `visibility:hidden` 令图表渲染。

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] deqingli commented on issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小

Posted by GitBox <gi...@apache.org>.
deqingli commented on issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小
URL: https://github.com/apache/incubator-echarts/issues/12094#issuecomment-576135459
 
 
   你好,没太明白你的需求,能详细描述下需要这样做的背景么?

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小
URL: https://github.com/apache/incubator-echarts/issues/12094#issuecomment-576076164
 
 
   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions.
   
   If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] github-actions[bot] commented on issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #12094:
URL: https://github.com/apache/echarts/issues/12094#issuecomment-1025230715


   This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in 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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] github-actions[bot] commented on issue #12094: getDataURL 不应该依赖于动画,并且提供参数设置图片大小

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #12094:
URL: https://github.com/apache/echarts/issues/12094#issuecomment-1030914262


   This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org