Giter Site home page Giter Site logo

Graph Export (SVG?) about jit HOT 3 CLOSED

philogb avatar philogb commented on August 23, 2024
Graph Export (SVG?)

from jit.

Comments (3)

philogb avatar philogb commented on August 23, 2024

Hi,

I'm not planning in adding this functionality built-in the toolkit, since I'm not sure I'd be supported by all browsers and the API could change, but there's a lib that does that and that could be combined with the toolkit.

You can find it here: http://www.nihilogic.dk/labs/canvas2image/ .

The code would be something like:

var viz = new $jit.Viz(...) //whatever Viz might be...
...
viz.refresh();
...
Canvas2Image.saveAsPNG(viz.canvas.getCtx().canvas);

Let me know how this goes.

from jit.

philogb avatar philogb commented on August 23, 2024

Oh, this would only work 100% with canvas based labels and nodes.

from jit.

gossi avatar gossi commented on August 23, 2024

Yep, I discovered this canvas ability as well and did some experimenting around it. Unfortunately, this only works with the current viewport of the canvas. To get the whole graph exported, I need the maximum dimensions of the graph with current zoom value, set it from the outside, export, set it back - than we could do amazing stuff with it :)
So, this is already captured in the issues #35 and #13 (I guess).

from jit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.