aboutsummaryrefslogtreecommitdiff
path: root/src/graph.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph.ts')
-rw-r--r--src/graph.ts11
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++) {