Giter Site home page Giter Site logo

sankey.js's Introduction

JavaScript ES6

sankey.js

JavaScript framework for creating Sankey diagrams with custom graphics. Screenshot

Supported diagrams

Diagrams that are supported can be characterized with following properties.

Supported Property Elaboration
✅ Yes Planar graphs "Planar drawings (or embeddings) make clear the structure of a given graph by eliminating crossing edges, which can be confused as additional vertices. Graphs defined by road networks, printed circuit board layouts, and the like are inherently planar because they are completely defined by surface structures." [1]
✅ Yes Directed graph Graph should be directed.
✅ Yes Acyclic graph Graph should be acyclic (e.g. no feedback loops, no material refinement loops).
✅ Yes More than one exit points (i.e. drains)? There can be any number of exit point since those nodes are handled just as any other node with exception to the source node.
❌ No More than one entry point (i.e. source)? There must be only one entry point. Layouting algorithm will use it as a starting point.
❌ No Orthogonal polyline drawings "Orthogonal means that all lines must be drawn either horizontal or vertical, with no intermediate slopes. Polyline means that each graph edge is represented by a chain of straight-line segments, connected by vertices or bends."[2]. Nodes can be connected only using relatively straight line that bends as it gets closer to the nodes (implemented using B-spline).

[1] Skiena, Steven S. “15.12 Planarity Detection and Embedding.” The Algorithm Design Manual, Springer, 2012, pp. 520–522.

[2] Skiena, Steven S. “15.10 Drawing Graphs Nicely.” The Algorithm Design Manual, Springer, 2012, pp. 513–516.

Features

Description
Screenshot Create model and let sanky.js do the layouting.
Screenshot Screenshot Distribute vertically to the top or center.
Screenshot Screenshot Align to other elements in the same column by left or center.
Screenshot Adjust margines among elements and window.
Screenshot Use custom SVG shapes for nodes. Shape can be picked based on type and property values (in our example it is efficiency level).
Screenshot Links can either be monochromatic or use custom two colored gradients along the stroke. Opacity can also be adjusted.

Very general technical information

  1. Has following dependancies
  2. Codebase is written in JavaScript ES6
  3. Solution uses webpack

Usage and Implementation details

For usage and implementation details have a look at projects 📖 Wiki page.

Slides that I've used for presentation at Fraunhofer IWU on date 2017-09-21: 2017-09-21 sankey.js - Fraunhofer IWU.pptx.

Support

Do you like it? Show it by giving a ⭐️. 🚀

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.