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

Output image #24

Open
unindented opened this issue Nov 16, 2015 · 12 comments
Open

Output image #24

unindented opened this issue Nov 16, 2015 · 12 comments

Comments

@unindented
Copy link

It'd be useful to be able to output an image, preferrably SVG. I could generate it as part of my build, and include the image in my README.

@danvk
Copy link
Owner

danvk commented Nov 16, 2015

Interesting idea. Do you know of any SVG treemap libraries for node?
On Mon, Nov 16, 2015 at 4:14 AM Daniel Perez Alvarez <
notifications@github.com> wrote:

It'd be useful to be able to output an image, preferrably SVG. I could
generate it as part of my build, and include the image in my README.


Reply to this email directly or view it on GitHub
#24.

@unindented
Copy link
Author

I'm wondering if you could get webtreemap to run on a virtual DOM inside a node process using jsdom...

People seem to be using that approach with d3: https://github.com/gregjopa/d3-server-side-demo

@danvk
Copy link
Owner

danvk commented Nov 16, 2015

Yeah, but then you'd have to convert the DOM to SVG as well. I'd be happy to look at a PR that implemented SVG output in some way.

@unindented
Copy link
Author

Ah, webtreemap doesn't output SVG... Would you be open to switching to d3 if I got it working?

@danvk
Copy link
Owner

danvk commented Nov 16, 2015

I'd be open to it. @martine, any thoughts?

@danvk
Copy link
Owner

danvk commented Nov 16, 2015

Just as an FYI, the current treemap is interactive. I wouldn't want to lose the interactivity if we moved to D3.

@unindented
Copy link
Author

Yup, understood. I may give it a whirl this weekend.

@danvk
Copy link
Owner

danvk commented Nov 16, 2015

Also FWIW, the webtreemap DOM is pretty simple. Converting it to SVG directly using jsdom might be easier.

@unindented
Copy link
Author

Ok, I'll look into that first.

@evmar
Copy link

evmar commented Nov 16, 2015

I wonder if you could use an SVG foreignObject with a canvas to render HTML:
https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Drawing_DOM_objects_into_a_canvas

On Mon, Nov 16, 2015 at 8:18 AM, Daniel Perez Alvarez <
notifications@github.com> wrote:

Ok, I'll look into that first.


Reply to this email directly or view it on GitHub
#24 (comment)
.

@cornips
Copy link

cornips commented Sep 29, 2021

@unindented Is there any outcome of your investigation?

@unindented
Copy link
Author

@cornips I never dedicated the time to get this working... 😢

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

No branches or pull requests

4 participants