indicatrix/elm-chartjs-webcomponent/3.0.0

Chartjs.Options.Elements

While there is ways to configure the styling of each dataset, sometimes you want custom styles applied to all datasets For more information, see https://www.chartjs.org/docs/latest/configuration/elements.html

Please note that this module does not have updater functions and you will need to use record update syntax if using this functionality

type alias Elements =
{ point : Maybe Point
, line : Maybe Line
, rectangle : Maybe Rectangle
, arc : Maybe Arc
}

Controls for all element types in a chart

defaultElements : Elements

Create a blank elements object

type alias Point =
{ radius : Maybe Int
, pointStyle : Maybe PointStyle
, rotation : Maybe Int
, backgroundColor : Maybe Color
, borderWidth : Maybe Int
, borderColor : Maybe Color
, hitRadius : Maybe Int
, hoverRadius : Maybe Int
, hoverBorderWidth : Maybe Int
}

Point specific properties

defaultPoint : Point

Create a blank point object

type alias Line =
{ tension : Maybe Float
, backgroundColor : Maybe Color
, borderWidth : Maybe Int
, borderColor : Maybe Color
, borderCapStyle : Maybe LineCap
, borderDash : Maybe (List Int)
, borderDashOffset : Maybe Int
, borderJoinStyle : Maybe LineJoin
, capBezierPoints : Maybe Bool
, fill : Maybe LineFill
, stepped : Maybe Bool
}

Line specific properties

= Zero
| Top
| Bottom
| NoFill

Line fill mode Useful for area charts

type alias Rectangle =
{ backgroundColor : Maybe Color
, borderWidth : Maybe Int
, borderColor : Maybe Color
, borderSkipped : Maybe Position
}

Rectangle specific properties (eg. bar charts)

type alias Arc =
{ backgroundColor : Maybe Color
, borderColor : Maybe Color
, borderWidth : Maybe Int
}

Arc specific properties (eg. pie chart, polar chart)