aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/DataVizBox/DataVizBox.scss2
-rw-r--r--src/client/views/nodes/DataVizBox/DataVizBox.tsx2
-rw-r--r--src/client/views/nodes/DataVizBox/components/Chart.scss7
-rw-r--r--src/client/views/nodes/DataVizBox/components/Histogram.tsx2
-rw-r--r--src/client/views/nodes/DataVizBox/components/LineChart.tsx5
-rw-r--r--src/client/views/nodes/DataVizBox/components/PieChart.tsx2
-rw-r--r--src/client/views/nodes/DataVizBox/components/TableBox.tsx4
7 files changed, 14 insertions, 10 deletions
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.scss b/src/client/views/nodes/DataVizBox/DataVizBox.scss
index ab2f19726..a69881b7c 100644
--- a/src/client/views/nodes/DataVizBox/DataVizBox.scss
+++ b/src/client/views/nodes/DataVizBox/DataVizBox.scss
@@ -1,5 +1,5 @@
.dataviz {
- overflow: hidden;
+ overflow: scroll;
height: 100%;
width: 100%;
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
index 8b951a002..9a4546900 100644
--- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx
+++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
@@ -116,7 +116,7 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
@computed get selectView() {
const width = this.props.PanelWidth() * 0.9;
const height = (this.props.PanelHeight() - 32) /* height of 'change view' button */ * 0.9;
- const margin = { top: 10, right: 25, bottom: 50, left: 25 };
+ const margin = { top: 10, right: 25, bottom: 75, left: 45 };
if (!this.pairs) return 'no data';
switch (this.dataVizView) {
case DataVizView.TABLE: return <TableBox layoutDoc={this.layoutDoc} pairs={this.pairs} axes={this.axes} height={height} width={width} margin={margin} rootDoc={this.rootDoc} docView={this.props.DocumentView} selectAxes={this.selectAxes}/>;
diff --git a/src/client/views/nodes/DataVizBox/components/Chart.scss b/src/client/views/nodes/DataVizBox/components/Chart.scss
index 996183cb8..35e5187b2 100644
--- a/src/client/views/nodes/DataVizBox/components/Chart.scss
+++ b/src/client/views/nodes/DataVizBox/components/Chart.scss
@@ -4,6 +4,7 @@
align-items: center;
cursor: default;
margin-top: 10px;
+ overflow-y: visible;
.graph{
overflow: visible;
@@ -22,8 +23,8 @@
display: flex;
flex-direction: row;
margin: 10px;
- margin-top: 0px;
- margin-bottom: -5px;
+ margin-top: -25px;
+ margin-bottom: 5px;
}
.slice {
&.hover {
@@ -78,4 +79,6 @@
.table-container{
overflow: scroll;
margin: 10px;
+ margin-left: 25px;
+ margin-top: 25px;
} \ No newline at end of file
diff --git a/src/client/views/nodes/DataVizBox/components/Histogram.tsx b/src/client/views/nodes/DataVizBox/components/Histogram.tsx
index 2a47abf32..cb882cf4a 100644
--- a/src/client/views/nodes/DataVizBox/components/Histogram.tsx
+++ b/src/client/views/nodes/DataVizBox/components/Histogram.tsx
@@ -454,6 +454,7 @@ export class Histogram extends React.Component<HistogramProps> {
size={Size.XSMALL}
/>
</div>
+ <div ref={this._histogramRef} />
{selected != 'none' ?
<div className={'selected-data'}>
Selected: {selected}
@@ -477,7 +478,6 @@ export class Histogram extends React.Component<HistogramProps> {
/>
</div>
: null}
- <div ref={this._histogramRef} />
</div>
) : <span className="chart-container"> {'first use table view to select a column to graph'}</span>
);
diff --git a/src/client/views/nodes/DataVizBox/components/LineChart.tsx b/src/client/views/nodes/DataVizBox/components/LineChart.tsx
index 77b3acf47..3a416c401 100644
--- a/src/client/views/nodes/DataVizBox/components/LineChart.tsx
+++ b/src/client/views/nodes/DataVizBox/components/LineChart.tsx
@@ -216,7 +216,6 @@ export class LineChart extends React.Component<LineChartProps> {
// TODO: nda - get rid of svg element in the list?
this._currSelected = x !== undefined && y !== undefined ? { x, y } : undefined;
this.props.pairs.forEach(pair => pair[this.props.axes[0]] === x && pair[this.props.axes[1]] === y && (pair.selected = true));
- this.props.pairs.forEach(pair => (pair.selected = pair[this.props.axes[0]] === x && pair[this.props.axes[1]] === y ? true : undefined));
}
drawDataPoints(data: DataPoint[], idx: number, xScale: d3.ScaleLinear<number, number, never>, yScale: d3.ScaleLinear<number, number, never>) {
@@ -369,8 +368,10 @@ export class LineChart extends React.Component<LineChartProps> {
fillWidth
/>
</div>
- <div className={'selected-data'}> {`Selected: ${selectedPt}`}</div>
<div ref={this._lineChartRef} />
+ {selectedPt!='none'?
+ <div className={'selected-data'}> {`Selected: ${selectedPt}`}</div>
+ : null}
</div>
) : <span className="chart-container"> {'first use table view to select two axes to plot'}</span>
);
diff --git a/src/client/views/nodes/DataVizBox/components/PieChart.tsx b/src/client/views/nodes/DataVizBox/components/PieChart.tsx
index cc5cc231b..ca93a2942 100644
--- a/src/client/views/nodes/DataVizBox/components/PieChart.tsx
+++ b/src/client/views/nodes/DataVizBox/components/PieChart.tsx
@@ -410,6 +410,7 @@ export class PieChart extends React.Component<PieChartProps> {
fillWidth
/>
</div>
+ <div ref={this._piechartRef} />
{selected != 'none' ?
<div className={'selected-data'}>
Selected: {selected}
@@ -424,7 +425,6 @@ export class PieChart extends React.Component<PieChartProps> {
/>
</div>
: null}
- <div ref={this._piechartRef} />
</div>
) : <span className="chart-container"> {'first use table view to select a column to graph'}</span>
);
diff --git a/src/client/views/nodes/DataVizBox/components/TableBox.tsx b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
index a7cc3f2fb..38dd62d8d 100644
--- a/src/client/views/nodes/DataVizBox/components/TableBox.tsx
+++ b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
@@ -49,7 +49,7 @@ export class TableBox extends React.Component<TableBoxProps> {
if (!this.props.layoutDoc.rowGuids) this.props.layoutDoc.rowGuids = new List<string>();
const guids = Cast(this.props.layoutDoc.rowGuids, listSpec("string"), null);
if (guids.length==0) this.props.pairs.map(row => guids.push(Utils.GenerateGuid()));
- return this._tableData.length ? Array.from(Object.keys(this._tableData[0])).filter(header => header!='') : [];
+ return this._tableData.length ? Array.from(Object.keys(this._tableData[0])).filter(header => header!='' && header!=undefined) : [];
}
filterSelectedRowsDown() {
@@ -66,7 +66,7 @@ export class TableBox extends React.Component<TableBoxProps> {
this.filterSelectedRowsDown();
if (this._tableData.length>0){
return (
- <div className="table-container" style={{height: this.props.height+this.props.margin.top+this.props.margin.bottom}}>
+ <div className="table-container" style={{height: this.props.height}}>
<table className="table">
<thead>
<tr className="table-row">