Skip to content

2. How to use?

Miroslav Jelaska edited this page Sep 18, 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.

Chapter content

# Step details
1 Initial setup
  1. How to load all dependancies, build and run project.
  2. Define custom entities by extending sankey.EntityBase
  3. Define custom shapes by extending sankey.ShapeBase (Shapes are visual representation of entities)
  4. Define options (i.e. settings)
  5. Load SVG images (only if they are needed for shapes)
  6. Define d3.js canvas that will be used for rendering
2 Create new ModelManager() and use it to build your model.
3 Pass your model to sankey.renderModel(model, canvas, options).

⬅️ Home (1.) 💈 Initial setup (How to run?) (2.i.) ➡️