aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/components/LineChart.tsx
diff options
context:
space:
mode:
authorsrichman333 <sarah_n_richman@brown.edu>2024-05-05 13:50:22 -0400
committersrichman333 <sarah_n_richman@brown.edu>2024-05-05 13:50:22 -0400
commit0d38f3e9bc4306c9e38decef5497c88c67376a83 (patch)
tree63b16818a509801a9a1354b26b89be935978d81c /src/client/views/nodes/DataVizBox/components/LineChart.tsx
parent4b4b7d2b4e905b3c64b0d0b42dd3ed329bad857e (diff)
$, %, etc... can be selected for histograms and linecharts
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components/LineChart.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/components/LineChart.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/LineChart.tsx b/src/client/views/nodes/DataVizBox/components/LineChart.tsx
index 11d117b29..e79f4cde5 100644
--- a/src/client/views/nodes/DataVizBox/components/LineChart.tsx
+++ b/src/client/views/nodes/DataVizBox/components/LineChart.tsx
@@ -209,7 +209,8 @@ export class LineChart extends ObservableReactComponent<LineChartProps> {
if (this._props.layoutDoc.dataViz_filterSelection){
const selectedRows = Cast(this._props.layoutDoc.dataViz_selectedRows, listSpec('number'), null);
this._tableDataIds.forEach(rowID => {
- if (this._props.records[rowID][this._props.axes[0]]==d.x && this._props.records[rowID][this._props.axes[1]]==d.y) {
+ if (this._props.records[rowID][this._props.axes[0]].replace(/\$/g, '').replace(/\%/g, '').replace(/\</g, '')==d.x
+ && this._props.records[rowID][this._props.axes[1]].replace(/\$/g, '').replace(/\%/g, '').replace(/\</g, '')==d.y) {
if (!selectedRows?.includes(rowID)) selectedRows?.push(rowID); // adding to filtered rows
else if (sameAsAny) selectedRows.splice(selectedRows.indexOf(rowID), 1); // removing from filtered rows
}