Skip to content

Commit 5c74693

Browse files
committed
Filter out zero count pie pieces.
1 parent a0111da commit 5c74693

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web-ui/src/pages/PulseReportPage.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ const PulseReportPage = () => {
233233
pieCounts[datapoint.externalScore - 1].value++;
234234
});
235235
}
236-
setPieChartData(pieCounts);
236+
// Filter out data with a zero value so that the pie chart does not attempt
237+
// to display them.
238+
setPieChartData(pieCounts.filter((p) => p.value != 0));
237239

238240
setScoreChartData(scoreChartDataPoints.map(day => {
239241
const iScores = {};

0 commit comments

Comments
 (0)