Giter VIP home page Giter VIP logo

Comments (5)

mdaines avatar mdaines commented on July 22, 2024

As far as I can tell, gradients don't work at present. I will keep this in mind for the future, however.

I tried one of the gradient examples in the Graphviz gallery and looked at the generated SVG, and it appears that colorLists are not handled -- they just appear in the SVG as "red:blue" or similar.

Can you get any of the gradient examples on the Graphviz site to work using the dot command?

from viz-js.

darkrift avatar darkrift commented on July 22, 2024

There is a post on stack overflow stating this feature was only added early this year (in January), and that it should be in the 2.30 version... I guess you won't add it until the 2.30 comes out then.

I'm not used to the graphviz toolkit. I was looking at a js library to do some graphing and found out graphviz linux commands were ported and the examples were what I wanted to achieve. I didn't know until now that gradients were new in the graphviz engine.

from viz-js.

darkrift avatar darkrift commented on July 22, 2024

and looking at the dev sources, they are at version 2.29 and last changes (in the dev source folder) were made a week ago ... Maybe I'll give it a try to compile it myself and see if it works on a separate branch

from viz-js.

mdaines avatar mdaines commented on July 22, 2024

If compiling 2.29 doesn't work, it might be possible to add gradients to an SVG element via the DOM or even with CSS -- but I haven't tried that. You might also be able to parse the "plain" output and use it as drawing instructions for another graphics library.

from viz-js.

mdaines avatar mdaines commented on July 22, 2024

Viz.js now uses Graphviz 2.38.0, which supports gradients.

from viz-js.

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.