File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 33043304 let height = toFixnum ( globalOptions [ 'height' ] ) ;
33053305 const vegaTooltipHandler = new vegaTooltip . Handler ( {
33063306 formatTooltip : ( value , valueToHtml , maxDepth , baseURL ) => {
3307- if ( typeof value === 'object' ) {
3307+ let ans ;
3308+ if ( typeof value === 'object' && value . title instanceof Array ) {
33083309 const { title, ...rest } = value ;
33093310 if ( title instanceof Array ) {
33103311 const titleStr = `<h2>${ title . map ( valueToHtml ) . join ( '<br/>' ) } </h2>` ;
33113312 const restStr = vegaTooltip . formatValue ( rest , valueToHtml , maxDepth , baseURL ) ;
3312- return titleStr + restStr ;
3313+ ans = titleStr + restStr ;
33133314 }
3315+ } else {
3316+ ans = vegaTooltip . formatValue ( value , valueToHtml , maxDepth , baseURL ) ;
33143317 }
3315- return vegaTooltip . formatValue ( value , valueToHtml , maxDepth , baseURL ) ;
3318+ ans = ans . replaceAll ( "<table>" , "<table class=\"pyret-row\">" ) ;
3319+ ans = ans . replaceAll ( "<td class=\"value\">" , "<td class=\"value replTextOutput\"> " ) ;
3320+ return ans ;
33163321 }
33173322 } ) ;
33183323 const view = new vega . View ( vega . parse ( processed ) , {
You can’t perform that action at this time.
0 commit comments