Coder Social home page Coder Social logo

palmerev / sankey Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nickbalestra/sankey

0.0 2.0 0.0 514 KB

A D3/Faux-dom/React App to build and read sankey diagrams

Home Page: http://nick.balestra.ch/sankey/

License: MIT License

JavaScript 82.81% CSS 9.51% HTML 7.68%

sankey's Introduction

Sankey - D3/REACT App

A D3/Faux-dom/React App to build and visualize Sankey diagrams:

  • D3 runs all the calculation.
  • A faux-dom coupled with D3 generates SVG elements in an isomorphic way.
  • React handles state and renderings.

DataFormat

You can import/export sankey diagrams using the following json format:

{ 
  nodes: [
    {"name":"node0"},
    {"name":"node1"}], 
  links: [
    {"source":0,"target":1,"value":100}
  ]
}

Install:

Make sure you have webpack installed globally:

$ npm i -g webpack

Install npm dependencies:

$ npm i

Build your bundle:

$ webpack or $ npm run dev

Serve your public/index.html via http to see and use the Sankey Diagram Builder App.

Webpack dev server

The webpack-dev-server is a little node.js Express server, which uses the webpack-dev-middleware to serve a webpack bundle. It also has a little runtime which is connected to the server via Socket.IO

Just run the server from the project root

$ webpack-dev-server or npm run dev-server


sankey's People

Contributors

nickbalestra 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.