@@ -54,7 +54,7 @@ const tooltipStyles = {
54
54
color : "white"
55
55
} ;
56
56
57
- /* DATA HANDLING FUNCTIONS */
57
+ /* DATA HANDLING HELPER FUNCTIONS */
58
58
const getPerfMetrics = ( snapshots , snapshotsIds ) => {
59
59
return snapshots . reduce ( ( perfSnapshots , curSnapshot , idx ) => {
60
60
return perfSnapshots . concat ( traverse ( curSnapshot , { snapshotId :snapshotsIds [ idx ] } ) )
@@ -120,11 +120,6 @@ const data = getPerfMetrics(snapshots, getSnapshotIds(hierarchy))
120
120
const keys = Object . keys ( data [ 0 ] ) . filter ( ( d ) => d !== "snapshotId" ) as CityName [ ] ;
121
121
const allComponentStates = traverse ( snapshots [ 0 ] )
122
122
123
- console . log ( keys )
124
- console . log ( 'data' , data )
125
- console . log ( 'snapshots' , snapshots )
126
- console . log ( allComponentStates )
127
-
128
123
// create array of total render times for each snapshot
129
124
const totalRenderArr = data . reduce ( ( totalRender , curSnapshot ) => {
130
125
const curRenderTotal = keys . reduce ( ( acc , cur ) => {
@@ -165,12 +160,6 @@ const yMax = height - margin.top - 150;
165
160
snapshotIdScale . rangeRound ( [ 0 , xMax ] ) ;
166
161
renderingScale . range ( [ yMax , 0 ] ) ;
167
162
168
- // console.log('totalRenderArr', totalRenderArr)
169
- // console.log('renderingScale domain', renderingScale.domain)
170
- // console.log('renderingscale range', renderingScale)
171
- console . log ( 'height' , height )
172
- // console.log(yMax)
173
-
174
163
return width < 10 ? null : (
175
164
// relative position is needed for correct tooltip positioning
176
165
@@ -263,31 +252,10 @@ console.log('height', height)
263
252
textAnchor : 'middle' ,
264
253
} ) }
265
254
/>
266
- < Text x = { - xMax / 2 } y = "15" transform = "rotate(-90)" fontSize = { 10 } fill = "#FFFFFF" >
267
- Rendering Time (ms)
268
- </ Text >
269
- < Text x = { xMax / 2 } y = { yMax + 100 } fontSize = { 10 } fill = "#FFFFFF" >
270
- Snapshot Id
271
- </ Text >
272
-
255
+ < Text x = { - xMax / 2 } y = "15" transform = "rotate(-90)" fontSize = { 10 } fill = "#FFFFFF" > Rendering Time (ms) </ Text >
256
+ < Text x = { xMax / 2 } y = { yMax + 100 } fontSize = { 10 } fill = "#FFFFFF" > Snapshot Id </ Text >
273
257
</ svg >
274
258
275
- { /* <div
276
- style={{
277
- position: "absolute",
278
- top: margin.top / 2 - 10,
279
- width: "100%",
280
- display: "flex",
281
- justifyContent: "center",
282
- fontSize: "14px"
283
- }}
284
- >
285
- <LegendOrdinal
286
- scale={colorScale}
287
- direction="row"
288
- labelMargin="0 15px 0 0"
289
- />
290
- </div> */ }
291
259
292
260
{ /* FOR HOVER OVER DISPLAY */ }
293
261
{ tooltipOpen && tooltipData && (
0 commit comments