indicatrix / elm-chartjs-webcomponent / Chartjs.Common

Common types used for various configuration properties


type PointStyle
    = Circle
    | Cross
    | CrossRot
    | Dash
    | Line
    | Rect
    | RectRounded
    | RectRot
    | Star
    | Triangle
    | Image String

For more information, see https://www.chartjs.org/samples/latest/charts/line/point-styles.html


type LineCap
    = LineCapButt
    | LineCapRound
    | LineCapSquare

For more information, see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineCap


type LineJoin
    = LineJoinBevel
    | LineJoinRound
    | LineJoinMiter

For more information, see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin


type Position
    = Top
    | Left
    | Bottom
    | Right

Positioning often used in options such as axes and legends


type Align
    = Start
    | End
    | Center

Alignment for certain text properties, such as title


type PointProperty a
    = All a
    | PerPoint (List a)

Many properties that apply to datasets can either be applied to the whole dataset, or to each individual point

For applying a property to every point in the dataset, use the All type For using a list of properties on a per-point basis, use the PerPoint type


type IndexAxis
    = XAxis
    | YAxis

Some charts can be transformed from horizontal to vertical by setting the index axis XAxis will produce a vertical chart (this is the default) YAxis will produce a horizontal chart