aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsrichman333 <sarah_n_richman@brown.edu>2023-08-24 12:57:49 -0400
committersrichman333 <sarah_n_richman@brown.edu>2023-08-24 12:57:49 -0400
commitbd69df995a69a72858c7a0aae6a728f54f9a5bb8 (patch)
treeede0b906f58a361464f274de82e92a80e0788592 /src
parentf91039f27fda5e1c10e6a8f11920ae2a2b305a16 (diff)
0 doesn't show in pie charts
Diffstat (limited to 'src')
-rw-r--r--src/.DS_Storebin10244 -> 10244 bytes
-rw-r--r--src/client/views/nodes/DataVizBox/components/PieChart.tsx1
2 files changed, 1 insertions, 0 deletions
diff --git a/src/.DS_Store b/src/.DS_Store
index 06389d6ae..3005fd3b3 100644
--- a/src/.DS_Store
+++ b/src/.DS_Store
Binary files differ
diff --git a/src/client/views/nodes/DataVizBox/components/PieChart.tsx b/src/client/views/nodes/DataVizBox/components/PieChart.tsx
index 6d8302b6a..524de1460 100644
--- a/src/client/views/nodes/DataVizBox/components/PieChart.tsx
+++ b/src/client/views/nodes/DataVizBox/components/PieChart.tsx
@@ -317,6 +317,7 @@ export class PieChart extends React.Component<PieChartProps> {
dataPoint = possibleDataPoints[trackDuplicates[d.data.toString()]];
trackDuplicates[d.data.toString()] = trackDuplicates[d.data.toString()] + 1;
}
+ if (dataPoint[percentField] && dataPoint[percentField]==0) return '';
return dataPoint ? dataPoint[percentField]! + (!descriptionField ? '' : ' - ' + dataPoint[descriptionField])! : '';
});
};