File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -36,16 +36,16 @@ class Chart extends Component {
36
36
37
37
maked3Tree ( ) {
38
38
this . removed3Tree ( ) ;
39
- let width = 960 ;
40
- let height = 1060 ;
41
- // const margin = {
42
- // top: 0,
43
- // right: 60,
44
- // bottom: 80,
45
- // left: 120,
46
- // };
39
+ let width = 600 ;
40
+ // let height = 1060;
41
+ const margin = {
42
+ top : 0 ,
43
+ right : 60 ,
44
+ bottom : 80 ,
45
+ left : 120 ,
46
+ } ;
47
47
// const width = 600 - margin.right - margin.left;
48
- // const height = 600 - margin.top - margin.bottom;
48
+ const height = 700 - margin . top - margin . bottom ;
49
49
50
50
let chartContainer = d3 . select ( this . chartRef . current )
51
51
. append ( 'svg' ) // chartContainer is now pointing to svg
@@ -70,7 +70,7 @@ class Chart extends Component {
70
70
71
71
let tree = d3 . tree ( )
72
72
// this assigns width of tree to be 2pi
73
- . size ( [ 2 * Math . PI , radius ] )
73
+ . size ( [ 2 * Math . PI , radius / 1.5 ] )
74
74
. separation ( function ( a , b ) { return ( a . parent == b . parent ? 1 : 2 ) / a . depth } ) ;
75
75
76
76
let d3root = tree ( hierarchy ) ;
You can’t perform that action at this time.
0 commit comments