From 66bf26f1dc93e1eb313548a80b41992b47757280 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 5 Apr 2020 11:57:39 +0200 Subject: [PATCH] Improved highlighted data calculation so that it works with values different than 1 --- src/visits/GraphCard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/visits/GraphCard.js b/src/visits/GraphCard.js index d9be74cc..d54c1674 100644 --- a/src/visits/GraphCard.js +++ b/src/visits/GraphCard.js @@ -50,7 +50,7 @@ const renderGraph = (title, isBarChart, stats, max, highlightedStats) => { const labels = keys(stats).map(dropLabelIfHidden); const data = values(!highlightedStats ? stats : keys(highlightedStats).reduce((acc, highlightedKey) => { if (acc[highlightedKey]) { - acc[highlightedKey] -= 1; + acc[highlightedKey] -= highlightedStats[highlightedKey]; } return acc;