Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

现在是否支持将绘制好的图保存为图片格式的呢?而非html #20

Open
gittigxuy opened this issue Feb 23, 2021 · 8 comments
Labels
help wanted Extra attention is needed

Comments

@gittigxuy
Copy link

No description provided.

@hustcc
Copy link
Owner

hustcc commented Feb 23, 2021

很好的提议,是否有能力来 pr 这个能力?

@hustcc hustcc added the help wanted Extra attention is needed label Mar 3, 2021
@Lix1993
Copy link

Lix1993 commented Mar 11, 2021

或许可以直接用这个?

from snapshot_selenium import snapshot

@hustcc
Copy link
Owner

hustcc commented Mar 11, 2021

或许可以直接用这个?

from snapshot_selenium import snapshot

应该可以的

@hustcc
Copy link
Owner

hustcc commented Mar 12, 2021

@Lix1993 可以在 readme 中加一个使用的案例应该就可以了。或者 PyGPlot 导出一个截图方法出来。

@Lix1993
Copy link

Lix1993 commented Mar 12, 2021

echarts专用的,
用下面的js截屏,
要改下

    var ele = document.querySelector('div[_echarts_instance_]');
    var mychart = echarts.getInstanceByDom(ele);
    return mychart.getDataURL({
        type: 'png',
        pixelRatio: 2,
         excludeComponents: ['toolbox']
    });
"""

@testerclub
Copy link

同求增加一个render_img方法,输出成图片,图片size可自定义

@hustcc
Copy link
Owner

hustcc commented Apr 21, 2021

有没有想来 contribute 的?如果没有的话,我五一期间试试看。

@sunslj
Copy link

sunslj commented Jan 11, 2022

2022了,render_img方法有实现吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants