From b98f3cb1c0e356c318e4d629e8baa05648c153e2 Mon Sep 17 00:00:00 2001
From: srichman333 <sarah_n_richman@brown.edu>
Date: Tue, 16 Apr 2024 17:02:23 -0400
Subject: makes histogram on transfer to text

---
 src/client/views/pdf/GPTPopup/GPTPopup.tsx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'src/client/views/pdf/GPTPopup/GPTPopup.tsx')

diff --git a/src/client/views/pdf/GPTPopup/GPTPopup.tsx b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
index 50835a541..706b44aef 100644
--- a/src/client/views/pdf/GPTPopup/GPTPopup.tsx
+++ b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
@@ -30,6 +30,7 @@ interface GPTPopupProps {}
 export class GPTPopup extends ObservableReactComponent<GPTPopupProps> {
     static Instance: GPTPopup;
     @observable private chatMode: boolean = false;
+    private correlatedColumns: string[] = []
 
     @observable
     public visible: boolean = false;
@@ -173,7 +174,9 @@ export class GPTPopup extends ObservableReactComponent<GPTPopupProps> {
             console.log(res)
             let json = JSON.parse(res! as string);
             const keys = Object.keys(json)
-            console.log(json[keys[0]], json[keys[1]])
+            this.correlatedColumns = []
+            this.correlatedColumns.push(json[keys[0]])
+            this.correlatedColumns.push(json[keys[1]])
             GPTPopup.Instance.setText(json[keys[2]] || 'Something went wrong.');
         } catch (err) {
             console.error(err);
@@ -199,7 +202,7 @@ export class GPTPopup extends ObservableReactComponent<GPTPopupProps> {
             });
         }
 
-        this.createFilteredDoc();
+        this.createFilteredDoc(this.correlatedColumns);
     };
 
     /**
-- 
cgit v1.2.3-70-g09d2

