aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/components
diff options
context:
space:
mode:
authorsrichman333 <sarah_n_richman@brown.edu>2024-01-11 14:28:27 -0500
committersrichman333 <sarah_n_richman@brown.edu>2024-01-11 14:28:27 -0500
commit3c6bef03e9f1cd019130056b83493c1c4e9ce0e1 (patch)
tree5a580ff638879eba77cf9fd5df82b13e9189da0e /src/client/views/nodes/DataVizBox/components
parent9200e09939ba3d23bcf79efda008a7a990d29b95 (diff)
parentd7f7d7db4494bb1091c7e8c603d5926aa175fe4e (diff)
Merge branch 'master' into data-visualization-sarah
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components')
-rw-r--r--src/client/views/nodes/DataVizBox/components/Histogram.tsx4
-rw-r--r--src/client/views/nodes/DataVizBox/components/LineChart.tsx4
-rw-r--r--src/client/views/nodes/DataVizBox/components/PieChart.tsx4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/Histogram.tsx b/src/client/views/nodes/DataVizBox/components/Histogram.tsx
index 9e9a43b34..4a1fb2ed1 100644
--- a/src/client/views/nodes/DataVizBox/components/Histogram.tsx
+++ b/src/client/views/nodes/DataVizBox/components/Histogram.tsx
@@ -105,13 +105,13 @@ export class Histogram extends ObservableReactComponent<HistogramProps> {
componentWillUnmount() {
Array.from(Object.keys(this._disposers)).forEach(key => this._disposers[key]());
}
- componentDidMount = () => {
+ componentDidMount() {
this._disposers.chartData = reaction(
() => ({ dataSet: this._histogramData, w: this.width, h: this.height }),
({ dataSet, w, h }) => dataSet!.length > 0 && this.drawChart(dataSet, w, h),
{ fireImmediately: true }
);
- };
+ }
@action
restoreView = (data: Doc) => {};
diff --git a/src/client/views/nodes/DataVizBox/components/LineChart.tsx b/src/client/views/nodes/DataVizBox/components/LineChart.tsx
index 50a8bf83d..2a9a8b354 100644
--- a/src/client/views/nodes/DataVizBox/components/LineChart.tsx
+++ b/src/client/views/nodes/DataVizBox/components/LineChart.tsx
@@ -89,7 +89,7 @@ export class LineChart extends ObservableReactComponent<LineChartProps> {
componentWillUnmount() {
Array.from(Object.keys(this._disposers)).forEach(key => this._disposers[key]());
}
- componentDidMount = () => {
+ componentDidMount() {
this._disposers.chartData = reaction(
() => ({ dataSet: this._lineChartData, w: this.width, h: this.height }),
({ dataSet, w, h }) => {
@@ -124,7 +124,7 @@ export class LineChart extends ObservableReactComponent<LineChartProps> {
},
{ fireImmediately: true }
);
- };
+ }
// anything that doesn't need to be recalculated should just be stored as drawCharts (i.e. computed values) and drawChart is gonna iterate over these observables and generate svgs based on that
diff --git a/src/client/views/nodes/DataVizBox/components/PieChart.tsx b/src/client/views/nodes/DataVizBox/components/PieChart.tsx
index e67556cd0..1259a13ff 100644
--- a/src/client/views/nodes/DataVizBox/components/PieChart.tsx
+++ b/src/client/views/nodes/DataVizBox/components/PieChart.tsx
@@ -91,13 +91,13 @@ export class PieChart extends ObservableReactComponent<PieChartProps> {
componentWillUnmount() {
Array.from(Object.keys(this._disposers)).forEach(key => this._disposers[key]());
}
- componentDidMount = () => {
+ componentDidMount() {
this._disposers.chartData = reaction(
() => ({ dataSet: this._pieChartData, w: this.width, h: this.height }),
({ dataSet, w, h }) => dataSet!.length > 0 && this.drawChart(dataSet, w, h),
{ fireImmediately: true }
);
- };
+ }
@action
restoreView = (data: Doc) => {};