mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-24 01:48:18 +03:00
Improved highlighted data calculation so that it works with values different than 1
This commit is contained in:
parent
f5cc1abe75
commit
66bf26f1dc
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ const renderGraph = (title, isBarChart, stats, max, highlightedStats) => {
|
||||||
const labels = keys(stats).map(dropLabelIfHidden);
|
const labels = keys(stats).map(dropLabelIfHidden);
|
||||||
const data = values(!highlightedStats ? stats : keys(highlightedStats).reduce((acc, highlightedKey) => {
|
const data = values(!highlightedStats ? stats : keys(highlightedStats).reduce((acc, highlightedKey) => {
|
||||||
if (acc[highlightedKey]) {
|
if (acc[highlightedKey]) {
|
||||||
acc[highlightedKey] -= 1;
|
acc[highlightedKey] -= highlightedStats[highlightedKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
|
|
Loading…
Reference in a new issue