@@ -57,8 +57,8 @@ function History(props) {
57
57
*/
58
58
let maked3Tree = function ( ) {
59
59
removed3Tree ( ) ;
60
- const width : number = 800 ;
61
- const height : number = 600 ;
60
+ const width : any = 800 ;
61
+ const height : any = 600 ;
62
62
const svgContainer = d3
63
63
. select ( HistoryRef . current )
64
64
. append ( 'svg' ) // svgContainer is now pointing to svg
@@ -68,7 +68,7 @@ function History(props) {
68
68
const g = svgContainer
69
69
. append ( 'g' )
70
70
// this is changing where the graph is located physically
71
- . attr ( 'transform' , `translate(${ width / 2 + 4 } , ${ height / 2 + 2 } )` ) ;
71
+ . attr ( 'transform' , `translate(${ width / 2 + 4 } , ${ height / 2 + 2 } )` )
72
72
73
73
// d3.hierarchy constructs a root node from the specified hierarchical data
74
74
// (our object titled dataset), which must be an object representing the root node
@@ -83,6 +83,7 @@ function History(props) {
83
83
84
84
const d3root = tree ( hierarchy ) ;
85
85
86
+
86
87
g . selectAll ( '.link' )
87
88
// root.links() gets an array of all the links,
88
89
// where each element is an object containing a
@@ -112,7 +113,7 @@ function History(props) {
112
113
113
114
if ( loadTime !== undefined ) {
114
115
if ( loadTime > 16 ) {
115
- return '#ff0000 ' ;
116
+ return '#d62b2b ' ;
116
117
}
117
118
}
118
119
@@ -249,9 +250,9 @@ function History(props) {
249
250
} ;
250
251
251
252
return (
252
- < div className = "history-d3-container" >
253
- < div ref = { HistoryRef } className = "history-d3-div" />
254
- </ div >
253
+ < >
254
+ < div ref = { HistoryRef } className = "history-d3-div" id = "historyContainer" />
255
+ </ >
255
256
) ;
256
257
}
257
258
0 commit comments