aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/DataVizBox/DataVizBox.tsx2
-rw-r--r--src/client/views/nodes/DataVizBox/components/LineChart.tsx4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
index 8593c8994..2666787c5 100644
--- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx
+++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
@@ -95,7 +95,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: 50, bottom: 50, left: 50 };
+ const margin = { top: 10, right: 10, bottom: 10, left: 10 };
if (!this.pairs) return 'no data';
// prettier-ignore
switch (this.dataVizView) {
diff --git a/src/client/views/nodes/DataVizBox/components/LineChart.tsx b/src/client/views/nodes/DataVizBox/components/LineChart.tsx
index bc9f0be77..ecb06f64f 100644
--- a/src/client/views/nodes/DataVizBox/components/LineChart.tsx
+++ b/src/client/views/nodes/DataVizBox/components/LineChart.tsx
@@ -235,8 +235,8 @@ export class LineChart extends React.Component<LineChartProps> {
const svg = (this._lineChartSvg = d3
.select(this._lineChartRef.current)
.append('svg')
- .attr('width', `${width + margin.right + margin.left}`)
- .attr('height', `${height + margin.top + margin.bottom}`)
+ .attr('width', `${width - margin.right - margin.left}`)
+ .attr('height', `${height - margin.top - margin.bottom}`)
.append('g')
.attr('transform', `translate(${margin.left}, ${margin.top})`));