From 8de07e0c17c2914bb6aff54f86e198eef5d2ac06 Mon Sep 17 00:00:00 2001 From: srichman333 Date: Thu, 25 Apr 2024 02:40:33 -0400 Subject: fixed filteres axes, console errors --- src/client/views/nodes/DataVizBox/components/Histogram.tsx | 8 ++++---- src/client/views/nodes/DataVizBox/components/TableBox.tsx | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/DataVizBox/components/Histogram.tsx b/src/client/views/nodes/DataVizBox/components/Histogram.tsx index d9f355f67..74711bd58 100644 --- a/src/client/views/nodes/DataVizBox/components/Histogram.tsx +++ b/src/client/views/nodes/DataVizBox/components/Histogram.tsx @@ -408,8 +408,8 @@ export class Histogram extends ObservableReactComponent { const eachData = histDataSet.filter((data: { [x: string]: number }) => { return data[xAxisTitle] == d[0]; }); - const length = eachData.length ? eachData[0][yAxisTitle].replace(/\$/g, '').replace(/\%/g, '').replace(/\ { const eachData = histDataSet.filter((data: { [x: string]: number }) => { return data[xAxisTitle] == d[0]; }); - const length = eachData.length ? eachData[0][yAxisTitle].replace(/\$/g, '').replace(/\%/g, '').replace(/\ { makeObservable(this); } + @action componentDidMount() { // if the tableData changes (ie., when records are selected by the parent (input) visulization), // then we need to remove any selected rows that are no longer part of the visualized dataset. @@ -137,7 +138,7 @@ export class TableBox extends ObservableReactComponent { const targetCreator = (annotationOn: Doc | undefined) => { const embedding = Doc.MakeEmbedding(this._props.docView?.()!.Document!); embedding._dataViz = DataVizView.TABLE; - embedding._dataViz_axes = new List([col, col]); + embedding._dataViz_axes = new List([col]); embedding._dataViz_parentViz = this._props.Document; embedding.annotationOn = annotationOn; embedding.histogramBarColors = Field.Copy(this._props.layoutDoc.histogramBarColors); -- cgit v1.2.3-70-g09d2