-
Notifications
You must be signed in to change notification settings - Fork 2
2. How to use?
Miroslav Jelaska edited this page Sep 13, 2017
·
12 revisions
This chapter will reflect on preview project for how to use sankey.js. Preview project can be found under root of this project in folder "preview". This section will describe how to run preview project.
Project uses ES6, and Webpack with Babel.
- Change directory to sankey.js/preview
- Restore npm packages.
npm install
Tip: Instead of npm you can also use yarn.
yarn install
- Run webpack Webpack should be globally installed. For installation instructions visit Webpack > getting-started.
webpack
- Run server from project root folder i.e. 'sankey.js'. There are many options available but here I will use node http-server.
http-server
- Visit localhost address. http-server runs it by default on http://127.0.0.1:8080.
# | Step details |
---|---|
1 |
Initial setup
|
2 | Create new ModelManager() and use it to build your model. |
3 | Pass your model to sankey.renderModel(model, canvas, options). |