terezka/elm-plot/4.0.0

NOTE: this package is not compatible with Elm 0.19.1

Plot.Area

Attributes for altering the view of your area serie.

myAreaSerie : Plot.Element (Interaction YourMsg)
myAreaSerie =
    line
        [ stroke "deeppink"
        , strokeWidth 2
        , fill "red"
        , opacity 0.5
        , customAttrs
            [ Svg.Events.onClick <| Custom MyClickMsg
            , Svg.Events.onMouseOver <| Custom Glow
            ]
        ]
        areaDataPoints

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.

fill : String -> Attribute a

Set the fill color.

Other

customAttrs : List (Attribute a) -> Attribute a

Add your own attributes. For events, see this example