An interactive tree representation of AlloMedia's Customer Path (demo).
This repository holds code for:
- An Elm package containing the logic of the component
- A npm package containing the SASS styles for the component
Note: while open sourced, these packages are most likely to be addressing the sole own needs of Allo-Media.
module Main exposing (..)
import Koivu
import Koivu.Tree as Tree
import Koivu.Settings exposing (Settings)
import Html
settings : Settings
settings =
{ autoNormalize = False
, globalQty = 100000
, minNodeQty = 3000
, maxChildren = 4
, maxGlobalQty = 200000
, maxLevels = 3
, nodeWidth = 140
, nodeHeight = 80
, nodePadding = 10
}
main : Program Never Koivu.Model Koivu.Msg
main =
Tree.demoTree
|> Koivu.setup settings
|> Html.program
You'll find a more elaborate integration example in
the example
subfolder.
A demo is available from the example
folder:
$ cd example
$ npm i
$ npm start
Then head to localhost:3000.
MIT