Remove line break HTML element from tooltipText
See original GitHub issueWhy are we adding the line break element to meta
for tooltipText
?
if (hasMeta) {
tooltipText += meta + '<br>';
}
I am currently implementing meta as HTML, so I simply format and style the tooltip contents with HTML and CSS. The extra line from the <br>
is unnecessary. Is the line break necessary in other implementations?
if (hasMeta) {
tooltipText += meta;
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Tooltip CSS: Remove new line - Stack Overflow
Let me explain a little as well: in HTML a <p> tag is a block element ... break the text in the <span>...
Read more >insert line break in tooltip text (tooltip is made using div element)
Today, I figured out how some basics of creating tooltips in d3.js using two very good examples: one by Mike Bostock at
Read more >Mystery line break - WordPress Development Stack Exchange
The <br> is a line break to signify that the paragraph starts back at the beginning of the next line - sorta like...
Read more >Multple line on title attribute of <a> element - MSDN
You might try manually setting the title attribute instead of using the ToolTip property to see if that works and use the newline-character...
Read more >How to prevent line breaks in the list of items using CSS?
The display:inline-block property is used to show an element in the inline-level block container. It converts the block of elements into an ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I suppose it depends on how much flexibility a user wants. For example, I only want to show my custom meta component in the tooltip and hide the value. The value is added by default though, which explains the line break:
For now, I’ve just edited the source file by removing the line break and creating an option for displaying the value:
Result:
@robjac Wow, that’s odd. I have never encountered that problem. I am still on Chartist v 0.9.8. I’ll keep an eye out for this when I get around to upgrading.