question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: Custom tooltip not rendering background

See original GitHub issue

When implementing a custom tootltip, the background is only under the title and not the title and the body.

Example at https://codepen.io/anon/pen/zyMRdG

image

Expected that the background should be covering the whole tootip

The options section is as follows:

options: {
  tooltips: {  		
    custom : t => {
      if(t.labelTextColors) {
        t.titleFontColor = t.labelTextColors[0];         
      }    		      
      t.title = ['Hello'];
      t.body  = [{ lines: ['foo']}];
    }
  }
}

My reason for a custom one is to override the title color depending on underlying data. A workaround is just to set the color like above but then implement the title and label callbacks, but it should be possible to just update the custom tooltip model in one go I thought?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
LeeLenaleeecommented, Feb 24, 2021

Dont know how much work it is to make it into a plugin, but I think that renaming it to html or external from custom might be a good idea to make it more clear its not customization for the default tooltip.

0reactions
etimbergcommented, Feb 27, 2021

Closing since custom was renamed to external and released in 3.0.0-beta.12

Read more comments on GitHub >

github_iconTop Results From Across the Web

ChartJS custom tooltip doesn't render background on labels ...
There seems to be an issue with the custom property. I recommend using the callbacks instead : tooltips: { displayColors: false ...
Read more >
Problem with Tooltips not loading on a dynamically generated ...
For some background, Intercom is loading directly from the code when the page is rendered, not via GTM. Thanks in advance for the...
Read more >
Solved: Tooltip color problem - Microsoft Power BI Community
Base on my research, there is no option to customize the background color of the tooltip box. This is by design.
Read more >
Angular Grid: Tooltip Component
If headerTooltip is not present, the tooltip will not be rendered. The example below shows how to set a custom tooltip to a...
Read more >
Problem with World of Warcraft Tooltips Not Showing Correctly ...
To get past the error you just have to refresh the page. 100% of the time it will load on the first refresh....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found