# HG changeset patch # User Benjamin Weber # Date 1666182161 -7200 # Wed Oct 19 14:22:41 2022 +0200 # Node ID 5105aeb3f15346c4421d2ec236bef7b999d6b8bf # Parent 580ab93c70e246ac3b3545cb81b52be2375d07ea playing around with custom tooltip text diff --git a/src/Charting.elm b/src/Charting.elm --- a/src/Charting.elm +++ b/src/Charting.elm @@ -51,8 +51,11 @@ C.interpolated (roundTo r << a) [ CA.width 3 ] [] |> C.named t dataPointsTwo tx x ty y = - let percentify = C.format (\v -> String.fromFloat v ++ "%") in - linesChart [ l x 1 tx |> percentify, l y 1 ty |> percentify] + let + percentify = + C.format (\v -> String.fromFloat v ++ "%") + in + linesChart [ l x 1 tx |> percentify, l y 1 ty |> percentify ] linesChart x = C.series .round x doneData @@ -89,6 +92,8 @@ , C.each (Maybe.withDefault [] cmodel.hovering) <| \p item -> [ C.tooltip item [] [] [] ] + + --[ C.tooltip item [] [] [H.text ":", H.text <| String.fromFloat 3] ] ]