lenards/elm-patternfly-charts/1.0.1

PF6.Charts.Stack

Stacked area chart — multiple series stacked atop each other to show both individual contributions and their total over time.

Uses the PF6 multi-unordered color scale by default.

Types

An opaque stacked area chart configuration.

type alias Series =
{ label : String
, values : List Float
}

A single series: label and one y-value per x step.

All series must have the same number of values. X positions are inferred as 0, 1, 2, ... (pass your own x values via the first element if needed).

Constructor

fromSeries : List Series -> StackChart

Create a stacked area chart from multiple series.

All series must have the same number of values; x positions are inferred as 0, 1, 2...

chart =
    Stack.fromSeries
        [ { label = "Project A", values = [ 10, 12, 15, 18, 16 ] }
        , { label = "Project B", values = [ 8, 9, 11, 13, 12 ] }
        , { label = "Project C", values = [ 5, 6, 7, 9, 8 ] }
        ]

Modifiers

Set chart width in pixels. Default: 500.

Set chart height in pixels. Default: 250.

Apply a Theme.

Set the x-axis label.

Set the y-axis label.

Set the chart title.

Show a skeleton placeholder instead of the chart while data is loading.

Renderer

toSvg : StackChart -> Html msg

Render to Html msg.