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.

Add support for line breaks in Label

See original GitHub issue

The code below does not render the \n as a new line (Bokeh 0.12.13)

from bokeh.plotting import figure, output_file, show
from bokeh.models import  Label

output_file("test.html")
fig = figure()
fig.line(x=range(10), y=range(10))
label = Label(x=2, y=8, text="New\nLine")
fig.add_layout(label)
show(fig)

A similar issue (#994) was solved by #6879.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:25
  • Comments:26 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
hiramfcommented, May 23, 2019

Any updates on this? Working with some very long categorical labels and text wrapping would be awesome.

1reaction
birdsarahcommented, Sep 19, 2018

Thanks (sorry, it’s been a minute - lots to remember)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add Line Breaks to a Label Control - O'Reilly
You want to insert line breaks in the text of a Web control such as the Label control. Solution. Add HTML markup to...
Read more >
How to display a label having text with line breaks?
The best method though is using <div contenteditable="true"></div> in which you can use tags like <br> and also css styling.
Read more >
Add line breaks in labels - Diagrams.net
Add line breaks in labels. You can add line breaks to shape and connector labels. Press Shift+Enter as you type the label text...
Read more >
Add a line break in a Label.Text - MSDN - Microsoft
Hey all,. How do you go about adding a line break into a Label.Text property programmatically? Label lblDescription = new Label();
Read more >
How to add line breaks on field labels? - Jotform
Profile Image. Kevin. Jotform Support. Answered on May 03, 2017 at 08:20 PM. Are you trying to add a line break to a...
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