terezka/elm-plot/4.0.1

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
        , 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.

Other

customAttrs : List (Attribute a) -> Attribute a

Add your own attributes. For events, see this example