terezka/elm-plot/4.0.1

NOTE: this package is not compatible with Elm 0.19.1

Plot.Scatter

Attributes for altering the view of your scatter serie.

myScatterSerie : Plot.Element (Interaction YourMsg)
myScatterSerie =
    line
        [ stroke "deeppink"
        , strokeWidth 2
        , fill "purple"
        , opacity 0.5
        , radius 10
        , customAttrs
            [ Svg.Events.onClick <| Custom MyClickMsg
            , Svg.Events.onMouseOver <| Custom Glow
            ]
        ]
        scatterDataPoints

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

fill : String -> Attribute a

Set the fill color.

opacity : Float -> Attribute a

Set the opacity.

radius : Int -> Attribute a

Set the radius of your points.

Other

customAttrs : List (Attribute a) -> Attribute a

Add your own attributes. For events, see this example