File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ class Chart extends Component {
42
42
. append ( 'svg' ) // chartContainer is now pointing to svg
43
43
. attr ( 'width' , width )
44
44
. attr ( 'height' , height ) ;
45
+
46
+ svg . call ( d3 . zoom ( )
47
+ . on ( "zoom" , function ( ) {
48
+ svg . attr ( "transform" , d3 . event . transform )
49
+ } ) )
50
+ . append ( "g" )
45
51
46
52
let g = chartContainer
47
53
. append ( "g" )
@@ -116,6 +122,7 @@ class Chart extends Component {
116
122
. on ( 'mouseover' , function ( d ) {
117
123
// without JSON.stringify, data will display as object Object
118
124
// console.log('d.data --> ', JSON.stringify(d.data))
125
+ let displayedState ;
119
126
tip . show ( JSON . stringify ( d . data . stateSnapshot ) , this )
120
127
} )
121
128
. on ( 'mouseout' , tip . hide )
Original file line number Diff line number Diff line change 4
4
background-color : black;
5
5
}
6
6
7
+ .node {
8
+ cursor : pointer;
9
+ }
10
+
7
11
/* this represents leaf nodes aka nodes with no children */
8
12
.node circle {
9
13
fill : # 5249f7 ;
@@ -45,16 +49,17 @@ body {
45
49
color : # 320a5c ;
46
50
border-radius : 4px ;
47
51
font-size : 15px ;
48
- width : 200px ;
52
+ width : 300px ;
53
+ overflow-wrap : break-word;
49
54
font-family : "Overpass Mono" , monospace;
50
55
}
51
56
52
57
/* Creates a small triangle extender for the tooltip */
53
58
.d3-tip : after {
54
59
box-sizing : border-box;
55
- /* display: inline; */
60
+ display : inline;
56
61
font-size : 15px ;
57
- width : 200 px ;
62
+ width : 100 % ;
58
63
line-height : 1 ;
59
64
color : # 9cf4df ;
60
65
content : "\25BC" ;
You can’t perform that action at this time.
0 commit comments