Package: pyecharts-snapshot-pro
News - 16.04.2019Since 0.2.0, NO LONGER, phantomjs is required! NO LONGER, it supports python 2.7BUT, the capability to render pyecharts in a script has been merged into
pyecharts 1.0.0. And the dependency on phantomjs has been sprawn as:snapshot-phantomjs.If you love to use ‘snapshot’ command line, please continue to use this
project.Introductionpyecharts-snapshot renders the output of pyecharts/echarts.js as a png, jpeg,
gif, eps, svg image, raw base64 encoding or a pdf file at command line.UsageGet png:$snapshotrender.htmlAnd you will get:Get pdf:$snapshotrender.htmlpdfAnd you will get:And here the code togenerate itGet svg:$snapshotrender.htmlsvgPlease be aware thatrender.htmlshould have configure echarts to do svg rendering. This library, being
stupid, does not make canvas rendered image as svg rendered. Here isan example svg file.Usage detailsCommand line options:$ snapshot output.html [png|jpeg|gif|svg|pdf] [delay] [pixel ratio]where:delaytells pyecharts-snapshot to take a snapshot after
some time measured in seconds. It is needed only when your snapshot is partial because the chart
animation takes long than 1.5 second(default).pixel ratiotells pyecharts-snapshot to use a different pixel ratio when generate
the image. It defaults to 2.Programmatical usage is simple:...somechart.render(path='cool_snapshot.png')# delay=1, pixel_ratio=3) 1 second delay, 3 as pixel ratiowhere delay as an optional parameter can be given to specifydelay_in_seconds.CoffeePlease buyme a coffeeif you think this library helped.InstallationYou can install pyecharts-snapshot via pip:$pipinstallpyecharts-snapshotor clone it and install it:$gitclonehttps://github.com/pyecharts/pyecharts-snapshot.git$cdpyecharts-snapshot$pythonsetup.pyinstallAnd you need to do:$pyppeteer-installNotepyppeteer-install is recommended but optional. Your first ever run ofsnapshotcommand will invoke pyppeteer-install. This command will
downloadChrominium,about 100MBTest statusFully tested on 3.6, 3.7 and 3.8-dev.ConstraintsOnly one image at a time. No 3D image supportDesign ConsiderationsGhost.Py: very hard to install on my own. DroppedMaintenance Instructionsinstall pyecharts-snapshotmake demotake screenshots of grid.pdf and snapshot.pdf in examples folderdocker image: arm use firfox is okFROMmcr.microsoft.com/playwright/python:v1.28.0-focalRUNaptinstallgccpython3-devlibhdf5-dev-y# psutilsContributors in alphabetical orderchengjiandongchfwAuthorChange log0.2.0 - 17.04.2019Addeduse pyppeteer, pythonic puppeteer for rendering pyecharts imageRemovedpython 2, 3.5- supportno more phantomjs dependencyprogrammatic rendering capability is removed. NO longer it is integrated with
pyecharts0.1.10 - 16.12.2018Added#33: Support
base64 encoding0.1.9 - 13.11.2018AddedSupport epsUpdatedLoosen the requirement on lml0.1.8 - 12.09.2018Fixed#28:
pixel_ratio as a parameter0.1.7 - 31.05.2018Fixed#23: phantomjs
on windows does not like absolute path but file uri formatted ones0.1.6 - 16.05.2018Updateduse system temp file instead of current working folder for tmp files0.1.5 - 11.04.2018Updatedbetter error verbose when phantomjs fails to generate output0.1.4 - 26.03.2018AddedTighter integration with pyecharts 0.4.2. SnapshotEnvironment extends the
rendering capability of pyecharts#16: phantomjs
check fails on windows#14: if the
output file name has a path, this library fails over0.1.3 - 12.03.2018Addedsvg support for pyecharts 0.4.00.1.2 - 21.12.2017Updated#9: delay 1.5
seconds0.1.1 - 17.12.2017Updatedhigher resolution screenshots for all platforms: windows and linux.0.1.0 - 15.12.2017Updatedsupport Mac OS Retina display, high resolution screenshots0.0.11 - 2.11.2017Updated#7: helpful error
message on missing phantomjs.0.0.10 - 23.10.2017Updatedpyexcelpyexcel#105,
remove gease from setup_requires, introduced by 0.0.9.0.0.9 - 21.10.2017Updated#6: show better0.0.8 - 08.09.2017Updated#5: fix0.0.7 - 26.08.2017UpdatedSave the output of pyecharts to gif file0.0.6 - 25.08.2017UpdatedAllow user to specify a custom delay period in seconds. Default is 0.5s0.0.5 - 22.08.20170.0.4 - 19.08.2017Updated#1: Support0.0.3 - 19.08.2017UpdatedRemove download image arrow on the output file0.0.2 - 18.08.2017AddedSave the output of pyecharts to pdf file0.0.1 - 17.08.2017AddedSave the output of pyecharts to png file