@@ -24,19 +24,18 @@ const margin = {
24
24
top : 30 ,
25
25
right : 30 ,
26
26
bottom : 0 ,
27
- left : 50 ,
27
+ left : 70 ,
28
28
} ;
29
29
const axisColor = '#161617' ;
30
30
const axisTickLabelColor = '#363638' ;
31
31
const axisLabelColor = '#363638' ;
32
32
const tooltipStyles = {
33
33
...defaultStyles ,
34
34
minWidth : 60 ,
35
- //backgroundColor: 'rgba(0,0,0,0.9)', //defaults to white
36
- //color: 'white', //defaults to a gray
37
- fontSize : '16px' ,
38
35
lineHeight : '18px' ,
39
- fontFamily : 'Roboto' ,
36
+ zIndex : 100 ,
37
+ pointerEvents : 'all !important' ,
38
+ padding : '12px' ,
40
39
} ;
41
40
42
41
const BarGraph = ( props : BarGraphProps ) : JSX . Element => {
@@ -75,7 +74,7 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
75
74
76
75
const keys = Object . keys ( data . componentData ) ;
77
76
const getSnapshotId = ( d : snapshot ) => d . snapshotId ; // data accessor (used to generate scales) and formatter (add units for on hover box). d comes from data.barstack post filtered data
78
- const formatSnapshotId = ( id ) => `Snapshot ID: ${ id } ` ; // returns snapshot id when invoked in tooltip section
77
+ const formatSnapshotId = ( id ) => `ID: ${ id } ` ; // returns snapshot id when invoked in tooltip section
79
78
const formatRenderTime = ( time ) => `${ time } ms ` ; // returns render time when invoked in tooltip section
80
79
81
80
const snapshotIdScale = scaleBand < string > ( {
@@ -91,16 +90,16 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
91
90
} ) ;
92
91
93
92
const LMcolorScale = [
94
- '#a0c1d6' ,
95
- '#669bbc' ,
96
- '#105377' ,
97
- '#003049' ,
98
- '#55a8ac' ,
99
- '#3c6e71' ,
100
- '#1c494b' ,
101
- '#c1676d' ,
102
- '#c1121f' ,
103
- '#780000' ,
93
+ '#14b8a6' , // Teal (matching existing accent)
94
+ '#0d9488' , // Darker teal (matching existing accent)
95
+ '#3c6e71' , // Primary strong teal
96
+ '#284b63' , // Primary blue
97
+ '#2c5282' , // Deeper blue
98
+ '#1a365d' , // Navy
99
+ '#2d3748' , // Blue gray
100
+ '#4a5568' , // Darker blue gray
101
+ '#718096' , // Medium blue gray
102
+ '#a0aec0' , // Light blue gray
104
103
] ;
105
104
106
105
const colorScale = scaleOrdinal < string > ( {
@@ -257,17 +256,18 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
257
256
fontSize : 11 ,
258
257
textAnchor : 'middle' ,
259
258
} ) }
259
+ tickFormat = { ( ) => '' } // Add this line to hide tick labels
260
260
/>
261
- < Text x = { - yMax / 2 - 75 } y = '15 ' transform = 'rotate(-90)' fontSize = { 16 } fill = { axisLabelColor } >
261
+ < Text x = { - yMax / 2 - 75 } y = '30 ' transform = 'rotate(-90)' fontSize = { 16 } fill = { axisLabelColor } >
262
262
Rendering Time (ms)
263
263
</ Text >
264
264
< br />
265
265
{ snapshot === 'All Snapshots' ? (
266
- < Text x = { xMax / 2 + 15 } y = { yMax + 70 } fontSize = { 16 } fill = { axisLabelColor } >
266
+ < Text x = { xMax / 2 + 15 } y = { yMax + 65 } fontSize = { 16 } fill = { axisLabelColor } >
267
267
Snapshot ID
268
268
</ Text >
269
269
) : (
270
- < Text x = { xMax / 2 + 15 } y = { yMax + 70 } fontSize = { 16 } fill = { axisLabelColor } >
270
+ < Text x = { xMax / 2 + 15 } y = { yMax + 65 } fontSize = { 16 } fill = { axisLabelColor } >
271
271
Components
272
272
</ Text >
273
273
) }
@@ -282,11 +282,15 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
282
282
left = { tooltipLeft }
283
283
style = { tooltipStyles }
284
284
>
285
- < div style = { { color : colorScale ( tooltipData . key ) } } >
285
+ < div
286
+ style = { {
287
+ color : colorScale ( tooltipData . key ) ,
288
+ paddingBottom : '8px' ,
289
+ } }
290
+ >
286
291
{ ' ' }
287
292
< strong > { tooltipData . key } </ strong > { ' ' }
288
293
</ div >
289
- < div > { 'State: ' + data . componentData [ tooltipData . key ] . stateType } </ div >
290
294
< div > { 'Render time: ' + formatRenderTime ( tooltipData . bar . data [ tooltipData . key ] ) } </ div >
291
295
< div >
292
296
{ ' ' }
0 commit comments