lenards/elm-patternfly-charts/1.0.0

NOTE: the latest version is 1.0.1

PF6.Charts.Line

Line chart — one or more series of connected data points.

Supports multiple series with automatic color assignment from the theme's multi-unordered color scale.

Types

An opaque line chart configuration.

type alias Series =
{ label : String
, data : List ( Float, Float )
}

A single named series of (x, y) data points.

Constructors

fromSeries : List Series -> LineChart

Create a line chart from multiple named series.

chart =
    Line.fromSeries
        [ { label = "inbound", data = [ ( 0, 10 ), ( 1, 20 ) ] }
        , { label = "outbound", data = [ ( 0, 8 ), ( 1, 18 ) ] }
        ]
fromData : List ( Float, Float ) -> LineChart

Create a single-series line chart from (x, y) pairs.

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 : LineChart -> Html msg

Render to Html msg.