indicatrix/elm-chartjs-webcomponent/3.0.0

Chartjs.Options

The Options type is used for configuring how the chart behaves This contains properties to control things like styling, fonts, etc.

type alias Options =
{ animations : Maybe Animations
, layout : Maybe Layout
, legend : Maybe Legend
, title : Maybe Title
, tooltips : Maybe Tooltips
, elements : Maybe Elements
, scales : Maybe (List Scale)
, maintainAspectRatio : Maybe Bool
, responsive : Maybe Bool
, cutoutPercentage : Maybe Int
, rotation : Maybe Float
, circumference : Maybe Float
}

These options are applied to the whole chart and not an individual dataset

defaultOptions : Options

Creates a blank options structure which can then be edited using the below set functions

setAnimations : Animations -> Options -> Options

Set the animations property

setElements : Elements -> Options -> Options

Set the elements property

setLayout : Layout -> Options -> Options

Set the layout property

setLegend : Legend -> Options -> Options

Set the legend property

setMaintainAspectRatio : Bool -> Options -> Options

Set whether to keep the aspect ratio of this chart consistent

setResponsive : Bool -> Options -> Options

Set whether this chart should be responsive Note: there is currently no parameters to directly set the width and hieght of the chart I strongly recommend sizing the parent web component and leaving this option enabled

setScales : List Scale -> Options -> Options

Set the scales property

addScale : Scale -> Options -> Options
setTitle : Title -> Options -> Options

Set the title property

setTooltips : Tooltips -> Options -> Options

Set the tootlips property

setCircumference : Float -> Options -> Options

Set the sweep (in radians) that arcs are allowed to cover

setCutoutPercentage : Int -> Options -> Options

Set the cutout percentage of this chart. By default, Doughnuts are 50 and Pies are 0

setRotation : Float -> Options -> Options

Set the starting angle (in radians) to draw arcs from