Code Monkey home page Code Monkey logo

Comments (5)

cpettitt avatar cpettitt commented on August 29, 2024 1

@randallto Sounds like a new ticket to me. It also needs a simple repro case.

from dagre-d3.

cpettitt avatar cpettitt commented on August 29, 2024

The simplest thing to do would be to remove the old rendering and redraw it. You can remove the old rendering using d3. For an example, take a look at demo/interactive-demo.html, which has this prior to running the renderer:

      // Cleanup old graph
      var svg = d3.select("svg > g");
      svg.selectAll("*").remove();

However, having the ability to rerun the render with a transition might be nice. I'll see what it would take to do that.

from dagre-d3.

cpettitt avatar cpettitt commented on August 29, 2024

I've got an early pass at support for transitions on this branch: https://github.com/cpettitt/dagre-d3/tree/transitions. I plan to add some configuration options around the transitions before pushing it to master.

from dagre-d3.

cpettitt avatar cpettitt commented on August 29, 2024

Fixed in v0.1.0. See interactive-demo.html for an example of using transitions.

from dagre-d3.

randallto avatar randallto commented on August 29, 2024

Using dagre in angularjs it seems to be persisting information from a previous chart drawing. You can reload the chart and first remove the entire svg element, re-add it and give it a new id even. The second loading of the same chart in the dagre seems to think the svg width is twice as big as previous and the height is half the size. I am drawing horizontal in instead of vertical. The nodes width space grows while the height shrinks. The causes a distorted chart. You hit 5f and all is good again.

from dagre-d3.

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.