@@ -24,19 +24,18 @@ const margin = {
2424 top : 30 ,
2525 right : 30 ,
2626 bottom : 0 ,
27- left : 50 ,
27+ left : 70 ,
2828} ;
2929const axisColor = '#161617' ;
3030const axisTickLabelColor = '#363638' ;
3131const axisLabelColor = '#363638' ;
3232const tooltipStyles = {
3333 ...defaultStyles ,
3434 minWidth : 60 ,
35- //backgroundColor: 'rgba(0,0,0,0.9)', //defaults to white
36- //color: 'white', //defaults to a gray
37- fontSize : '16px' ,
3835 lineHeight : '18px' ,
39- fontFamily : 'Roboto' ,
36+ zIndex : 100 ,
37+ pointerEvents : 'all !important' ,
38+ padding : '12px' ,
4039} ;
4140
4241const BarGraph = ( props : BarGraphProps ) : JSX . Element => {
@@ -75,7 +74,7 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
7574
7675 const keys = Object . keys ( data . componentData ) ;
7776 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
7978 const formatRenderTime = ( time ) => `${ time } ms ` ; // returns render time when invoked in tooltip section
8079
8180 const snapshotIdScale = scaleBand < string > ( {
@@ -91,16 +90,16 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
9190 } ) ;
9291
9392 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
104103 ] ;
105104
106105 const colorScale = scaleOrdinal < string > ( {
@@ -257,17 +256,18 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
257256 fontSize : 11 ,
258257 textAnchor : 'middle' ,
259258 } ) }
259+ tickFormat = { ( ) => '' } // Add this line to hide tick labels
260260 />
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 } >
262262 Rendering Time (ms)
263263 </ Text >
264264 < br />
265265 { 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 } >
267267 Snapshot ID
268268 </ Text >
269269 ) : (
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 } >
271271 Components
272272 </ Text >
273273 ) }
@@ -282,11 +282,15 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
282282 left = { tooltipLeft }
283283 style = { tooltipStyles }
284284 >
285- < div style = { { color : colorScale ( tooltipData . key ) } } >
285+ < div
286+ style = { {
287+ color : colorScale ( tooltipData . key ) ,
288+ paddingBottom : '8px' ,
289+ } }
290+ >
286291 { ' ' }
287292 < strong > { tooltipData . key } </ strong > { ' ' }
288293 </ div >
289- < div > { 'State: ' + data . componentData [ tooltipData . key ] . stateType } </ div >
290294 < div > { 'Render time: ' + formatRenderTime ( tooltipData . bar . data [ tooltipData . key ] ) } </ div >
291295 < div >
292296 { ' ' }
0 commit comments