aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/components/PieChart.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-11-18 14:36:09 -0500
committerbobzel <zzzman@gmail.com>2023-11-18 14:36:09 -0500
commit1b568af6b2725b9eed6f591bfce193d39d5804de (patch)
treee92b4bc38938dc2fa9faf686ca77ca9c5a7b71cf /src/client/views/nodes/DataVizBox/components/PieChart.tsx
parent338eeba98b7b7ac159553346e5505b1ec95acde3 (diff)
fixed scaling of dataviz boxes when native dims are set.
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components/PieChart.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/components/PieChart.tsx6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/PieChart.tsx b/src/client/views/nodes/DataVizBox/components/PieChart.tsx
index 561f39141..7303eb184 100644
--- a/src/client/views/nodes/DataVizBox/components/PieChart.tsx
+++ b/src/client/views/nodes/DataVizBox/components/PieChart.tsx
@@ -88,11 +88,7 @@ export class PieChart extends React.Component<PieChartProps> {
componentDidMount = () => {
this._disposers.chartData = reaction(
() => ({ dataSet: this._pieChartData, w: this.width, h: this.height }),
- ({ dataSet, w, h }) => {
- if (dataSet!.length > 0) {
- this.drawChart(dataSet, w, h);
- }
- },
+ ({ dataSet, w, h }) => dataSet!.length > 0 && this.drawChart(dataSet, w, h),
{ fireImmediately: true }
);
};