File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -111,17 +111,32 @@ export default Ember.Component.extend({
111
111
return "translate(" + d . y + "," + d . x + ")" ;
112
112
} ) ;
113
113
114
- node . append ( "circle" )
115
- . attr ( "r" , 2.5 ) ;
114
+ nodeEnter . append ( 'text' )
115
+ . attr ( 'dy' , '-1.1em' )
116
+ . style ( "text-anchor" , function ( d ) { return d . children ? "end" : "start" ; } )
117
+ . text ( d => d . data . _id ) ;
116
118
117
- node . append ( "text" )
118
- . attr ( "dy" , 3 )
119
- . attr ( "x" , function ( d ) { return d . children ? - 8 : 8 ; } )
119
+ nodeEnter . append ( "text" )
120
+ . attr ( "dy" , '0.1em' )
120
121
. style ( "text-anchor" , function ( d ) { return d . children ? "end" : "start" ; } )
121
122
. text ( function ( d ) {
122
123
return d . data . id . name ;
123
124
} ) ;
124
125
126
+ nodeEnter . append ( "text" )
127
+ . attr ( "dy" , '1.1em' )
128
+ . style ( "text-anchor" , function ( d ) { return d . children ? "end" : "start" ; } )
129
+ . text ( function ( d ) {
130
+ return `total: ${ ( d . value / 1000000 ) . toFixed ( 2 ) } ` ;
131
+ } ) ;
132
+
133
+ nodeEnter . append ( "text" )
134
+ . attr ( "dy" , '2.1em' )
135
+ . style ( "text-anchor" , function ( d ) { return d . children ? "end" : "start" ; } )
136
+ . text ( function ( d ) {
137
+ return `self: ${ ( d . data . stats . time . self / 1000000 ) . toFixed ( 2 ) } ` ;
138
+ } ) ;
139
+
125
140
let zoomHandler = zoom ( )
126
141
. scaleExtent ( [ 0.1 , 3 ] )
127
142
. on ( "zoom" , ( ) => {
You can’t perform that action at this time.
0 commit comments