GitXplorerGitXplorer
n

sankey

public
47 stars
22 forks
0 issues

Commits

List of commits on branch master.
Unverified
d6c9b4df52d8c668f2c1d1694fe8d69ae5287a75

small typo in readme

nnickbalestra committed 9 years ago
Unverified
ede6e8b862081ed65811ad378ed749003b7cb4f8

fixed grid

nnickbalestra committed 9 years ago
Unverified
7c0344f7363043ae78b195b31674e2d22ee61e9c

commented out JSX version

nnickbalestra committed 9 years ago
Unverified
03c940befbfa18b20943b2eb08a9c0caae195d3e

reordered elements

nnickbalestra committed 9 years ago
Unverified
5f5dfd115e55758eeb341a582f7c7d49704c11cb

fixed binding in case of JSX vs fauxDOM

nnickbalestra committed 9 years ago
Unverified
9b7b9bfc6d8b557ed0ced4747b577efff6b10048

jsx vs d3-fauxDOM

nnickbalestra committed 9 years ago

README

The README file for this repository.

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