diff options
author | srichman333 <sarah_n_richman@brown.edu> | 2023-08-24 12:57:49 -0400 |
---|---|---|
committer | srichman333 <sarah_n_richman@brown.edu> | 2023-08-24 12:57:49 -0400 |
commit | bd69df995a69a72858c7a0aae6a728f54f9a5bb8 (patch) | |
tree | ede0b906f58a361464f274de82e92a80e0788592 /src | |
parent | f91039f27fda5e1c10e6a8f11920ae2a2b305a16 (diff) |
0 doesn't show in pie charts
Diffstat (limited to 'src')
-rw-r--r-- | src/.DS_Store | bin | 10244 -> 10244 bytes | |||
-rw-r--r-- | src/client/views/nodes/DataVizBox/components/PieChart.tsx | 1 |
2 files changed, 1 insertions, 0 deletions
diff --git a/src/.DS_Store b/src/.DS_Store Binary files differindex 06389d6ae..3005fd3b3 100644 --- a/src/.DS_Store +++ b/src/.DS_Store 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])! : ''; }); }; |