indicatrix/elm-chartjs-webcomponent/2.0.0

NOTE: the latest version is 3.0.0

Chartjs.Options.Tooltips

For more information, see https://www.chartjs.org/docs/latest/configuration/tooltip.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 Tooltips =
{ enabled : Maybe Bool
, mode : Maybe Mode
, intersect : Maybe Bool
, position : Maybe PositionMode
, backgroundColor : Maybe Color
, titleFontFamily : Maybe String
, titleFontSize : Maybe Int
, titleFontStyle : Maybe String
, titleFontColor : Maybe Color
, titleSpacing : Maybe Int
, titleMarginBottom : Maybe Int
, bodyFontFamily : Maybe String
, bodyFontSize : Maybe Int
, bodyFontStyle : Maybe String
, bodyFontColor : Maybe Color
, bodySpacing : Maybe Int
, footerFontFamily : Maybe String
, footerFontSize : Maybe Int
, footerFontStyle : Maybe String
, footerFontColor : Maybe Color
, footerSpacing : Maybe Int
, footerMarginTop : Maybe Int
, xPadding : Maybe Int
, yPadding : Maybe Int
, caretPadding : Maybe Int
, carretSize : Maybe Int
, cornerRadius : Maybe Int
, multiKeyBackground : Maybe Color
, displayColors : Maybe Bool
, borderColor : Maybe Bool
, borderWidth : Maybe Int
}

Tooltips are displayed when interacting with charts

defaultTooltips : Tooltips

Create a blank tooltips object

= PositionModeAverage
| PositionModeNearest

Positioning mode for tooltips

Average will place the tooltip at the average position of the displayed items Nearest will place the tooltip at the element closest to the event position

type Mode
= Point
| Nearest
| Index
| DataSet
| X
| Y

Controls what elements are displayed in the tooltip Point: finds all items that intersect the point Nearest: gets the items that are at the nearest distance to the point Index: finds item at the same index X: find all items that interesct (based on X axis only) Y: find all items that intersect (based on Y axis only)