From fadea5f0a75dc94c6ae1e3828b4b52da29becabf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Bona=C4=87i?= Date: Wed, 25 Nov 2020 19:50:29 +0100 Subject: [PATCH] Fix YAxisLabels formatting example The current example did not demonstrate label color/weight change, since the final label (`label.text`) never was `20.00`. --- docs/src/docs/YAxisLabels/examples/YAxisLabels.js.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/docs/YAxisLabels/examples/YAxisLabels.js.example b/docs/src/docs/YAxisLabels/examples/YAxisLabels.js.example index 3348ad07..69d9f9a1 100644 --- a/docs/src/docs/YAxisLabels/examples/YAxisLabels.js.example +++ b/docs/src/docs/YAxisLabels/examples/YAxisLabels.js.example @@ -15,7 +15,7 @@ const YAxisLabelsExample = (props) => { position="right" tickCount={5} labelStyle={(label) => { - const is20 = label.text === "20.00" + const is20 = Math.abs(label.value) === 20; return { fill: is20 ? "green" : "black", fontWeight: is20 ? 900 : 400