# HG changeset patch # User Benjamin Weber # Date 1666182092 -7200 # Wed Oct 19 14:21:32 2022 +0200 # Node ID 2ea946d94713275601edddaae48abdee5273aebb # Parent 54c73d579b6722f764f147cb892a15da2163a1c9 include percent suffix in tooltip of line charts diff --git a/src/Charting.elm b/src/Charting.elm --- a/src/Charting.elm +++ b/src/Charting.elm @@ -51,7 +51,8 @@ C.interpolated (roundTo r << a) [ CA.width 3 ] [] |> C.named t dataPointsTwo tx x ty y = - linesChart [ l x 1 tx, l y 1 ty ] + 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 diff --git a/src/Main.elm b/src/Main.elm --- a/src/Main.elm +++ b/src/Main.elm @@ -484,7 +484,7 @@ column [ width fill, height fill, spacing 25 ] [ el [ paddingXY 10 0, Font.size 14, centerX ] <| column [ width fill, height fill ] [ text t1, text t2 ], theChart x ] in column [ width fill, height fill, spacing 30 ] - [ cc [ headedChart "How much gets done?" "[% incoming jobs]" model.chart1, headedChart "How long does it take?" "[% jobs ≥ 5 cycles flow time]" model.chart3, headedChart "How much rework?" "[% jobs requiring rework]" model.chart5 ] + [ cc [ headedChart "How much gets done?" "[incoming jobs]" model.chart1, headedChart "How long does it take?" "[jobs ≥ 5 cycles flow time]" model.chart3, headedChart "How much rework?" "[jobs requiring rework]" model.chart5 ] ] cy =