The Options type is used for configuring how the chart behaves This contains properties to control things like styling, fonts, etc.
{ animations : Maybe Animations
, layout : Maybe Layout
, legend : Maybe Legend
, title : Maybe Title
, tooltips : Maybe Tooltips
, elements : Maybe Elements
, scales : Maybe (List Scale)
, maintainAspectRatio : Maybe Basics.Bool
, responsive : Maybe Basics.Bool
, cutoutPercentage : Maybe Basics.Int
, rotation : Maybe Basics.Float
, circumference : Maybe Basics.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 : Basics.Bool -> Options -> Options
Set whether to keep the aspect ratio of this chart consistent
setResponsive : Basics.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 : Basics.Float -> Options -> Options
Set the sweep (in radians) that arcs are allowed to cover
setCutoutPercentage : Basics.Int -> Options -> Options
Set the cutout percentage of this chart. By default, Doughnuts are 50 and Pies are 0
setRotation : Basics.Float -> Options -> Options
Set the starting angle (in radians) to draw arcs from