Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

allo-media/koivu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

koivu

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.

Minimal program

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.

Running the demo locally

A demo is available from the example folder:

$ cd example
$ npm i
$ npm start

Then head to localhost:3000.

License

MIT

About

An interactive tree representation of AlloMedia's Customer Path

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors