terezka/elm-plot/3.0.0

NOTE: this package is not compatible with Elm 0.19.1

Plot.Pile

The pile groups your bar series together and you can also add some attributes to alter the view of the bars.

myBarsSerie : Plot.Element (Interaction YourMsg)
myBarsSerie =
    pile
        [ Pile.maxBarWidthPer 85 ]
        [ Pile.bars
            [ Bars.fill Common.pinkFill ]
            data
        ]

Definition

type alias Element msg =
Element msg
type alias Attribute =
Config -> Config

Elements

bars : List (Attribute msg) -> List Point -> Element msg

Add a bar series.

Styling

maxBarWidth : Int -> Attribute

Set a fixed max width (in pixels) on your bars.

maxBarWidthPer : Int -> Attribute

Set a relative max width (in percentage) your bars.