aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/DataVizBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DataVizBox.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/DataVizBox.tsx22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
index 0c1063e0c..c5ad3c84d 100644
--- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx
+++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
@@ -41,23 +41,6 @@ export class DataVizBox extends ViewBoxBaseComponent<FieldViewProps>() {
public static LayoutString(fieldKey: string) { return FieldView.LayoutString(DataVizBox, fieldKey); }
- @action
- private async createPairs() {
- // const xVals: number[] = [0, 1, 2, 3, 4, 5];
- // // const yVals: number[] = [10, 20, 30, 40, 50, 60];
- // const yVals: number[] = [1, 2, 3, 4, 5, 6];
- // let pairs: {
- // x: number,
- // y:number
- // }[] = [];
- // if (xVals.length != yVals.length) return pairs;
- // for (let i = 0; i < xVals.length; i++) {
- // pairs.push({x: xVals[i], y: yVals[i]});
- // }
- // this.pairs = pairs;
- // this.pairs = await this.fetchData();
- }
-
@computed get selectView() {
switch(this.currView) {
case "table":
@@ -107,6 +90,11 @@ export class DataVizBox extends ViewBoxBaseComponent<FieldViewProps>() {
}
render() {
+
+ if (this.pairs.length == 0) {
+ return <div>Loading...</div>
+ }
+
return (
<div className="dataViz">
<button onClick={(e) => this.changeViewHandler(e)}>Change View</button>