From 481a847b1074c9544e947e409b96778ac4d4f852 Mon Sep 17 00:00:00 2001
From: srichman333 <sarah_n_richman@brown.edu>
Date: Wed, 9 Aug 2023 15:24:03 -0400
Subject: numerical y axis data fix

---
 src/client/views/nodes/DataVizBox/components/TableBox.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/client/views/nodes/DataVizBox/components/TableBox.tsx')

diff --git a/src/client/views/nodes/DataVizBox/components/TableBox.tsx b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
index 277ee83ec..f80cbdf99 100644
--- a/src/client/views/nodes/DataVizBox/components/TableBox.tsx
+++ b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
@@ -123,10 +123,10 @@ export class TableBox extends React.Component<TableBoxProps> {
                                                             const newAxes = this.props.axes;
                                                             if (newAxes.includes(col)) {
                                                                 newAxes.splice(newAxes.indexOf(col), 1);
-                                                            } else if (newAxes.length >= 1) {
+                                                            } else if (newAxes.length > 1) {
                                                                 newAxes[1] = col;
                                                             } else {
-                                                                newAxes[0] = col;
+                                                                newAxes.push(col);
                                                             }
                                                             this.props.selectAxes(newAxes);
                                                         })
-- 
cgit v1.2.3-70-g09d2

