terezka/elm-plot/4.1.0

NOTE: this package is not compatible with Elm 0.19.1

Plot.Line

Attributes for altering the view of your line serie.

myLineSerie : Plot.Element (Interaction YourMsg)
myLineSerie =
    line
        [ stroke "deeppink"
        , strokeWidth 2
        , opacity 0.5
        , smoothing Cosmetic
        , customAttrs
            [ Svg.Events.onClick <| Custom MyClickMsg ]
        ]
        lineDataPoints

Definition

type alias Attribute a =
Config a -> Config a

Styling

stroke : String -> Attribute a

Set the stroke color.

strokeWidth : Int -> Attribute a

Set the stroke width (in pixels).

opacity : Float -> Attribute a

Set the opacity.

smoothingBezier : Attribute a

Smooth line with [Bézier curves] (https://en.wikipedia.org/wiki/B%C3%A9zier_curve).

Other

customAttrs : List (Attribute a) -> Attribute a

Add your own attributes. For events, see this example