From d95e149cf6a5d2f5d49d4143d93a06f65bbe94a4 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Wed, 19 Aug 2020 23:30:31 -0700 Subject: [PATCH] Fixed bug with rankings display. --- components/charts/RankingsChart.js | 6 +++--- lib/format.js | 5 ++++- package.json | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/components/charts/RankingsChart.js b/components/charts/RankingsChart.js index 89de63a3..be73be97 100644 --- a/components/charts/RankingsChart.js +++ b/components/charts/RankingsChart.js @@ -58,7 +58,7 @@ export default function RankingsChart({ const { x, y, z } = rankings[index]; return (
- +
); }; @@ -108,7 +108,7 @@ export default function RankingsChart({ ); } -const AnimatedRow = ({ label, value, percent, animate, format }) => { +const AnimatedRow = ({ label, value = 0, percent, animate, format }) => { const props = useSpring({ width: percent, y: value, @@ -119,7 +119,7 @@ const AnimatedRow = ({ label, value, percent, animate, format }) => { return (
{label}
- {props.y.interpolate(format)} + {props.y?.interpolate(format)}
= 1000000) { return `${(n / 1000000).toFixed(1)}m`; } @@ -57,5 +59,6 @@ export function formatLongNumber(n) { if (n >= 1000) { return `${(n / 1000).toFixed(2)}k`; } + return formatNumber(n); } diff --git a/package.json b/package.json index 4f494e65..dc2c4b8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "0.10.2", + "version": "0.10.3", "description": "A simple, fast, website analytics alternative to Google Analytics. ", "author": "Mike Cao ", "license": "MIT",