Skip to content

Commit 041ffa0

Browse files
committed
increase size of d3 history chart and add container around it
1 parent 1147456 commit 041ffa0

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

src/app/components/Chart.jsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ class Chart extends Component {
4848
maked3Tree() {
4949

5050
this.removed3Tree();
51-
const margin = {
52-
top: 0,
53-
right: 60,
54-
bottom: 200,
55-
left: 120,
56-
};
57-
const width = 600 - margin.right - margin.left;
58-
const height = 700 - margin.top - margin.bottom;
51+
// const margin = {
52+
// top: 0,
53+
// right: 60,
54+
// bottom: 200,
55+
// left: 120,
56+
// };
57+
const width = 600; // - margin.right - margin.left;
58+
const height = 600; // 700 - margin.top - margin.bottom;
5959
const chartContainer = d3.select(this.chartRef.current)
6060
.append('svg') // chartContainer is now pointing to svg
6161
.attr('width', width)
@@ -207,7 +207,11 @@ class Chart extends Component {
207207
}
208208

209209
render() {
210-
return <div ref={this.chartRef} className="d3Container" />;
210+
return (
211+
<div className="history-d3-container">
212+
<div ref={this.chartRef} className="d3Container" />
213+
</div>
214+
);
211215
}
212216
}
213217

src/app/styles/components/d3graph.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ div.tooltip {
9393
left: 0;
9494
}
9595

96+
.history-d3-container {
97+
display: flex;
98+
flex-direction: column;
99+
justify-content: space-between;
100+
height: calc(100% - 70px);
101+
/* border: 2px solid red; */
102+
}
103+
96104
.perfContainer {
97105
display: flex;
98106
flex-direction: column;

0 commit comments

Comments
 (0)