@@ -431,13 +431,12 @@ function addTooltips(chart, hoverStyles = {fill: BLUE, opacity: 0.5 }) {
431431 . join ( 'g' )
432432 . attr ( 'class' , 'hover' )
433433 . style ( 'pointer-events' , NONE )
434- . style ( 'text-anchor' , 'middle' )
435- . style ( 'fill' , '#333' ) ;
434+ . style ( 'text-anchor' , 'middle' ) ;
436435
437- // add a unique id to the chart for styling
436+ // create a unique id for the chart for styling
438437 const id = idGenerator ( ) ;
439438
440- // Add the event listeners
439+ // add chart event listeners to display tooltips
441440 d3 . select ( chart )
442441 . classed ( id , true ) // using a class selector so that it doesn't overwrite the ID
443442 . selectAll ( 'title' )
@@ -536,8 +535,8 @@ function hover(tip, pos, text) {
536535 . attr ( 'x' , bbox . x - sidePadding )
537536 . attr ( 'width' , bbox . width + sidePadding * 2 )
538537 . attr ( 'height' , bbox . height + verticalPadding * 2 )
539- . style ( 'fill' , 'white ' )
540- . style ( 'stroke' , '#d3d3d3 ' )
538+ . style ( 'fill' , 'var(--vscode-editor-background) ' )
539+ . style ( 'stroke' , 'var(--vscode-panel-border) ' )
541540 . lower ( ) ;
542541}
543542
0 commit comments