From 0d665c8de086d79d8c49e01a262a520c65505fbf Mon Sep 17 00:00:00 2001 From: Determinant Date: Sat, 23 Feb 2019 01:20:27 -0500 Subject: improve the UI --- src/graph.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/graph.ts') diff --git a/src/graph.ts b/src/graph.ts index 8b385a3..5c0ab7f 100644 --- a/src/graph.ts +++ b/src/graph.ts @@ -74,11 +74,12 @@ export async function getGraphData( if (ratio < 1e-2) minorSum += d.value; else majorParts.push(d); }); - majorParts.push({ - name: 'Other', - value: minorSum, - color: defaultChartColor, - }); + if (minorSum > 0) + majorParts.push({ + name: 'Other', + value: minorSum, + color: defaultChartColor, + }); return majorParts; }; for (let i = 0; i < patterns.length; i++) { -- cgit v1.2.3