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

NodeHTML content lost when exporting graph to png #36

Open
invaders-xx opened this issue Dec 5, 2019 · 5 comments
Open

NodeHTML content lost when exporting graph to png #36

invaders-xx opened this issue Dec 5, 2019 · 5 comments

Comments

@invaders-xx
Copy link

When I export my graph which is using this plugin to display information inside the node, I loose all those information when exporting the graph to png.

Is there any option to get those information ?

Many thanks in advance.

David

@sagarrabadiya
Copy link

same problem

@jeppebm
Copy link

jeppebm commented Apr 23, 2020

I'm imagining that this problem is hard to solve, since going from Canvas to PNG is not the same as going from HTML to PNG.

But i'm in the same boat, would absolutely love that feature.

@gamespark
Copy link

gamespark commented Oct 29, 2021

I tried html-to-dom to export html nodes to imageA (with transparent background), and trim the image as cy trims it's export imageB too.
Then merge imageA to imageB using canvas.
Finally export image from canvas.
It works pretty great.

@jeppebm
Copy link

jeppebm commented Oct 29, 2021

I've been using html2canvas, which is really straight forward. Just give it the canvas container and it includes both canvas and any html contained in/above it, like the node labels.

https://html2canvas.hertzen.com/

@gamespark
Copy link

Thanks, I just try it, really really simple. .
Although there are some problems to resolve.
Like non display area export, if zoom in is not allowed and the chart is very big.
Will keep researching it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants