GithubHelp home page GithubHelp logo

pombredanne / dependency_wheel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from versioneye/dependency_wheel

0.0 2.0 0.0 167 KB

JS Lib to visualize recursive dependencies for software libraries.

License: MIT License

JavaScript 100.00%

dependency_wheel's Introduction

Dependency Wheel

This is a fork from the MooWheel Class version 0.2 from unwieldy studios http://unwieldy.net. Written by Augusto Becciu. You can get more information to MooWheel here http://unwieldy.net/web/moowheel

This fork is customized to visualize dependencies for software libraries. It is used on https://www.versioneye.com to show recursive dependencies for Java and Ruby Projects.

This fork is very strongly customized for VersionEye. But anyway! Feel free to take a look and get some inspiration :-)

Images

Some of the dependency wheels created at VersionEye are on Pinterest.com. This image below is one example.

Code Example

It is very easy to use the library. All you need is HTML div.

<div id="canvas-container"></div>

And a little bit JavaScript.

<script type="text/javascript">
  function render_wheel(){
    canvas_container = document.getElementById("canvas-container")
    if (canvas_container){
      alert("Canvas element is missing!")
      return ;
    }
    var wheel = new DependencyWheel.Remote(false, canvas_container, {
      url: 'YOUR_RESOURCE_RETURNING_JSON.json',
      width: "605",
      height: "605",
      infoBox: "infoBox",
      canvas_id: "canvas",
      canvas_hover_id: "canvas_hover",
      onItemClick: function(item, event){
        window.location.href = "YOUR_NEW_RESOURCE";
      }
    } );
  }
</script>

The server resource has to deliver a JSON string with this structure:

[
  {
    connections: [
      "id_to_another_node_1"
      "id_to_another_node_1"
      ],
    dependencies: [
      "id_to_another_node_1"
    ],
    text: "Label text of this node",
    id: "id_of_this_node",
    version: "version string"
  }
]

Here is a short example:

[
  {
    connections: [ "node_2" ],
    dependencies:[ "node_2" ],
    text: "node_1",
    id: "node_1",
    version: "1.0.0"
  },
  {
    connections: [ "node_1" ],
    text: "node_2",
    id: "node_2",
    version: "1.0.0"
  }
]

The example above will render 2 nodes who are connected with each other.

License

MIT License http://www.opensource.org/licenses/MIT

dependency_wheel's People

Contributors

coding46 avatar pombredanne avatar reiz avatar veye avatar

Watchers

 avatar  avatar

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.