Coder Social home page Coder Social logo

Comments (4)

soxofaan avatar soxofaan commented on July 20, 2024

demo of current implementation: http://bl.ocks.org/soxofaan/7c96560677ead0425fe7

screen shot 2015-05-29 at 02 09 49

from d3-plugin-captain-sankey.

androidkencai avatar androidkencai commented on July 20, 2024

the cycles support is very cool. Thanks soxofaan for the great work! However, I need some help as got into performance issues when cycles path included in links. the data size is not huge, with 23 nodes and about 126 links. The UI didn't render. If all the cycle path removed, it rendered right away. Attaching the test data below. Thanks!

[ {"name": "0"},
{"name": "1"},
{"name": "2"},
{"name": "3"},
{"name": "4"},
{"name": "5"},
{"name": "6"},
{"name": "7"},
{"name": "8"},
{"name": "9"},
{"name": "10"},
{"name": "11"},
{"name": "12"},
{"name": "13"},
{"name": "14"},
{"name": "15"},
{"name": "16"},
{"name": "17"},
{"name": "18"},
{"name": "19"},
{"name": "20"},
{"name": "21"},
{"name": "22"}]

//links
[{"source": 8, "target": 9,"value": 1},
{"source": 9, "target": 20,"value": 1},
{"source": 20, "target": 14,"value": 1},
{"source": 14, "target": 12,"value": 1},
{"source": 12, "target": 13,"value": 1},
{"source": 13, "target": 15,"value": 1},
{"source": 15, "target": 10,"value": 1},
{"source": 10, "target": 18,"value": 1},
{"source": 18, "target": 19,"value": 1},
{"source": 19, "target": 11,"value": 1},
{"source": 11, "target": 16,"value": 1},
{"source": 16, "target": 18,"value": 1},
{"source": 18, "target": 19,"value": 1},
{"source": 19, "target": 17,"value": 1},
{"source": 17, "target": 21,"value": 1},
{"source": 21, "target": 4,"value": 1},
{"source": 4, "target": 0,"value": 1},
{"source": 0, "target": 2,"value": 1},
{"source": 2, "target": 22,"value": 1},
{"source": 22, "target": 3,"value": 1},
{"source": 3, "target": 1,"value": 1},
{"source": 1, "target": 5,"value": 1},
{"source": 5, "target": 6,"value": 1},
{"source": 6, "target": 7,"value": 1},
{"source": 8, "target": 9,"value": 1},
{"source": 9, "target": 20,"value": 1},
{"source": 20, "target": 14,"value": 1},
{"source": 14, "target": 15,"value": 1},
{"source": 15, "target": 10,"value": 1},
{"source": 10, "target": 18,"value": 1},
{"source": 18, "target": 19,"value": 1},
{"source": 19, "target": 11,"value": 1},
{"source": 11, "target": 16,"value": 1},
{"source": 16, "target": 18,"value": 1},
{"source": 18, "target": 19,"value": 1},
{"source": 19, "target": 17,"value": 1},
{"source": 17, "target": 21,"value": 1},
{"source": 21, "target": 4,"value": 1},
{"source": 4, "target": 0,"value": 1},
{"source": 0, "target": 2,"value": 1},
{"source": 2, "target": 22,"value": 1},
{"source": 22, "target": 3,"value": 1},
{"source": 3, "target": 1,"value": 1},
{"source": 1, "target": 5,"value": 1},
{"source": 5, "target": 6,"value": 1},
{"source": 6, "target": 7,"value": 1},
{"source": 8, "target": 9,"value": 1},
{"source": 9, "target": 20,"value": 1},
{"source": 20, "target": 14,"value": 1},
{"source": 14, "target": 15,"value": 1},
{"source": 15, "target": 10,"value": 1},
{"source": 10, "target": 18,"value": 1},
{"source": 18, "target": 19,"value": 1},
{"source": 19, "target": 11,"value": 1},
{"source": 11, "target": 16,"value": 1},
{"source": 16, "target": 18,"value": 1},
{"source": 18, "target": 19,"value": 1},
{"source": 19, "target": 17,"value": 1},
{"source": 17, "target": 21,"value": 1},
{"source": 21, "target": 4,"value": 1},
{"source": 4, "target": 0,"value": 1},
{"source": 0, "target": 2,"value": 1},
{"source": 2, "target": 3,"value": 1},
{"source": 3, "target": 1,"value": 1},
{"source": 1, "target": 5,"value": 1},
{"source": 5, "target": 6,"value": 1},
{"source": 6, "target": 7,"value": 1},
{"source": 8, "target": 9,"value": 1},
{"source": 9, "target": 20,"value": 1},
{"source": 20, "target": 21,"value": 1},
{"source": 21, "target": 4,"value": 1},
{"source": 4, "target": 5,"value": 1},
{"source": 5, "target": 6,"value": 1},
{"source": 6, "target": 7,"value": 1},
{"source": 8, "target": 9,"value": 1},
{"source": 9, "target": 20,"value": 1},
{"source": 20, "target": 21,"value": 1},
{"source": 21, "target": 4,"value": 1},
{"source": 4, "target": 22,"value": 1},
{"source": 22, "target": 5,"value": 1},
{"source": 5, "target": 6,"value": 1},
{"source": 6, "target": 7,"value": 1},
{"source": 8, "target": 9,"value": 1},
{"source": 9, "target": 20,"value": 1},
{"source": 20, "target": 14,"value": 1},
{"source": 14, "target": 15,"value": 1},
{"source": 15, "target": 10,"value": 1},
{"source": 10, "target": 18,"value": 1},
{"source": 18, "target": 19,"value": 1},
{"source": 19, "target": 11,"value": 1},
{"source": 11, "target": 16,"value": 1},
{"source": 16, "target": 18,"value": 1},
{"source": 18, "target": 19,"value": 1},
{"source": 19, "target": 17,"value": 1},
{"source": 17, "target": 21,"value": 1},
{"source": 21, "target": 4,"value": 1},
{"source": 4, "target": 0,"value": 1},
{"source": 0, "target": 2,"value": 1},
{"source": 2, "target": 22,"value": 1},
{"source": 22, "target": 3,"value": 1},
{"source": 3, "target": 1,"value": 1},
{"source": 1, "target": 5,"value": 1},
{"source": 5, "target": 6,"value": 1},
{"source": 6, "target": 7,"value": 1},
{"source": 8, "target": 9,"value": 1},
{"source": 9, "target": 20,"value": 1},
{"source": 20, "target": 14,"value": 1},
{"source": 14, "target": 15,"value": 1},
{"source": 15, "target": 10,"value": 1},
{"source": 10, "target": 18,"value": 1},
{"source": 18, "target": 19,"value": 1},
{"source": 19, "target": 11,"value": 1},
{"source": 11, "target": 16,"value": 1},
{"source": 16, "target": 18,"value": 1},
{"source": 18, "target": 19,"value": 1},
{"source": 19, "target": 17,"value": 1},
{"source": 17, "target": 21,"value": 1},
{"source": 21, "target": 4,"value": 1},
{"source": 4, "target": 0,"value": 1},
{"source": 0, "target": 2,"value": 1},
{"source": 2, "target": 22,"value": 1},
{"source": 22, "target": 3,"value": 1},
{"source": 3, "target": 1,"value": 1},
{"source": 1, "target": 5,"value": 1},
{"source": 5, "target": 6,"value": 1},
{"source": 6, "target": 7,"value": 1}]

from d3-plugin-captain-sankey.

soxofaan avatar soxofaan commented on July 20, 2024

hi @androidkencai, thanks for you feedback

did you try that on the master branch, or on the feature branch of this issue?
https://github.com/soxofaan/d3-plugin-captain-sankey/tree/issue-6-cycle-handling

I also noticed you have a lot of duplicates in your links. There are only 29 unique links:

{"source": 0, "target": 2,"value": 1},
{"source": 1, "target": 5,"value": 1},
{"source": 10, "target": 18,"value": 1},
{"source": 11, "target": 16,"value": 1},
{"source": 12, "target": 13,"value": 1},
{"source": 13, "target": 15,"value": 1},
{"source": 14, "target": 12,"value": 1},
{"source": 14, "target": 15,"value": 1},
{"source": 15, "target": 10,"value": 1},
{"source": 16, "target": 18,"value": 1},
{"source": 17, "target": 21,"value": 1},
{"source": 18, "target": 19,"value": 1},
{"source": 19, "target": 11,"value": 1},
{"source": 19, "target": 17,"value": 1},
{"source": 2, "target": 22,"value": 1},
{"source": 2, "target": 3,"value": 1},
{"source": 20, "target": 14,"value": 1},
{"source": 20, "target": 21,"value": 1},
{"source": 21, "target": 4,"value": 1},
{"source": 22, "target": 3,"value": 1},
{"source": 22, "target": 5,"value": 1},
{"source": 3, "target": 1,"value": 1},
{"source": 4, "target": 0,"value": 1},
{"source": 4, "target": 22,"value": 1},
{"source": 4, "target": 5,"value": 1},
{"source": 5, "target": 6,"value": 1},
{"source": 6, "target": 7,"value": 1},
{"source": 8, "target": 9,"value": 1},
{"source": 9, "target": 20,"value": 1},

Is there any reason for having all these duplicates?

If I eliminate all or some duplicates, the rendering goes a lot faster and renders this:
screen shot 2015-11-02 at 23 57 03

from d3-plugin-captain-sankey.

androidkencai avatar androidkencai commented on July 20, 2024

Hi @soxofaan, sorry for the late reply. right, those duplicates should be combined. regardless when having large set of links. there are performance issues.

just FYI, I found that this version has better performance. Thanks!
http://sankey.csaladen.es/

from d3-plugin-captain-sankey.

Related Issues (10)

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.