1} size={200} />
- {pieData.length === 1 && firstPieSlice && (
-
- {firstPieSlice.label}: {firstPieSlice.value} (100%)
-
+
+ {pieData.length === 1 && firstPieSlice ? (
+
+
+
+ {firstPieSlice.label}: {firstPieSlice.value} (100%)
+
+
+ ) : (
+
+ {pieData.filter((d) => d.value > 0).map((d) => (
+
+
+ {d.label}
+
+ ))}
+
)}