File tree Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,12 @@ class Chart extends Component {
88
88
} ) ;
89
89
90
90
node . append ( "circle" )
91
- . attr ( "r" , 20 )
91
+ . attr ( "r" , 15 )
92
92
93
93
node
94
94
. append ( "text" )
95
95
// adjusts the y coordinates for the node text
96
- . attr ( "dy" , "0.3em " )
96
+ . attr ( "dy" , "0.276em " )
97
97
. attr ( "x" , function ( d ) {
98
98
// this positions how far the text is from leaf nodes (ones without children)
99
99
// negative number before the colon moves the text of rightside nodes, positive number moves the text for the leftside nodes
Original file line number Diff line number Diff line change @@ -107,6 +107,11 @@ class Chart extends Component {
107
107
. on ( 'mouseover' , mouseover )
108
108
. on ( 'mouseout' , mouseout )
109
109
. on ( 'mousemove' , d => mousemove ( d ) ) ;
110
+
111
+ function mousemove ( d ) {
112
+ div
113
+ . text ( ! d . state ? 'No state found' : JSON . stringify ( d . state , null , 4 ) )
114
+ }
110
115
111
116
nodeEnter
112
117
. append ( 'circle' )
@@ -228,13 +233,6 @@ class Chart extends Component {
228
233
. style ( 'display' , 'none' ) ;
229
234
}
230
235
231
- function mousemove ( d ) {
232
- div
233
- . text ( ! d . state ? 'No state found' : JSON . stringify ( d . state , null , 4 ) )
234
- . style ( 'left' , `${ d3 . event . pageX } px` )
235
- . style ( 'top' , `${ d3 . event . pageY } px` ) ;
236
- }
237
-
238
236
update ( root ) ;
239
237
duration = 750 ;
240
238
Original file line number Diff line number Diff line change 9
9
}
10
10
.node text {
11
11
font-size : 15px ;
12
- font-family : 'Raleway' , sans-serif;;
12
+ font-family : 'Raleway' , sans-serif;
13
13
}
14
14
/* this represents text for leaf nodes aka the ones with no children */
15
15
.node--leaf {
16
- fill : # F4C1B6 ;
16
+ fill : # 71e9e1 ;
17
17
}
18
18
19
19
/* this represents those nodes that have children */
22
22
}
23
23
/* modifies text of parent nodes (has children) */
24
24
.node--internal text {
25
- fill : white ;
26
- font-size : 25 px ;
25
+ fill : # fae6e4 ;
26
+ font-size : 19 px ;
27
27
28
28
}
29
29
.link {
30
30
fill : none;
31
31
stroke : # 3853ea ;
32
32
stroke-opacity : 0.4 ;
33
33
stroke-width : 3px ;
34
- }
34
+ }
35
+
You can’t perform that action at this time.
0 commit comments