diff options
author | Determinant <ted.sybil@gmail.com> | 2019-02-23 01:20:27 -0500 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2019-02-23 01:20:27 -0500 |
commit | 0d665c8de086d79d8c49e01a262a520c65505fbf (patch) | |
tree | 1b499bfa4abd52429ebc5fc46c00f559260e626d /src/graph.ts | |
parent | f23552831c5f2310a3afa4b16198e06a7283a069 (diff) |
improve the UI
Diffstat (limited to 'src/graph.ts')
-rw-r--r-- | src/graph.ts | 11 |
1 files changed, 6 insertions, 5 deletions
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++) { |