Skip to content

Commit 535846e

Browse files
committed
fixing what gets displayed in tooltip on hover
1 parent 47d359e commit 535846e

File tree

4 files changed

+22
-145
lines changed

4 files changed

+22
-145
lines changed

package-lock.json

Lines changed: 17 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"bower": "^1.8.8",
6565
"d3": "^4.13.0",
6666
"d3-tip": "^0.9.1",
67+
"d3-zoom": "^1.8.3",
6768
"immer": "^3.2.0",
6869
"jsondiffpatch": "^0.3.11",
6970
"prop-types": "^15.7.2",

src/app/components/Chart.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class Chart extends Component {
3939

4040
maked3Tree() {
4141
this.removed3Tree();
42-
let width = 900;
43-
let height = 1000;
42+
let width = 960;
43+
let height = 1060;
4444
let chartContainer = d3.select(this.chartRef.current)
4545
.append('svg') // chartContainer is now pointing to svg
4646
.attr('width', width)
@@ -118,8 +118,8 @@ class Chart extends Component {
118118
node
119119
.on('mouseover', function (d) {
120120
// without JSON.stringify, data will display as object Object
121-
console.log('this is inside mouseover fxnality', JSON.stringify(d.data.stateSnaphot))
122-
tip.show(JSON.stringify(d.data), this)
121+
console.log('d.data --> ', JSON.stringify(d.data))
122+
tip.show(JSON.stringify(d.data.stateSnapshot), this)
123123
})
124124
.on('mouseout', tip.hide)
125125

src/app/components/ChartTIPTEST.jsx

Lines changed: 0 additions & 138 deletions
This file was deleted.

0 commit comments

Comments
 (0)