Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for line breaks in Label #7317

Closed
PhML opened this issue Dec 13, 2017 · 26 comments · Fixed by #11578
Closed

Add support for line breaks in Label #7317

PhML opened this issue Dec 13, 2017 · 26 comments · Fixed by #11578

Comments

@PhML
Copy link

PhML commented Dec 13, 2017

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.

@bryevdv bryevdv changed the title Add support for multi line in Label Add support for line breaks in Label May 10, 2018
@bryevdv bryevdv added this to the short-term milestone May 10, 2018
@birdsarah
Copy link
Member

@bryevdv
Copy link
Member

bryevdv commented Sep 19, 2018

In the mean time, as a workaround, the text glyph does support line breaks.

@birdsarah
Copy link
Member

Can text be positioned on plot in screen units (so it doesn't move on pan)? (I did look at docs, but couldn't figure it out).

@bryevdv
Copy link
Member

bryevdv commented Sep 19, 2018

No, glyph coordinates are data space

@birdsarah
Copy link
Member

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

@mattpap mattpap modified the milestones: short-term, 1.0.2 Nov 16, 2018
@bryevdv bryevdv modified the milestones: 1.0.2, 1.0.3 Nov 29, 2018
@bryevdv bryevdv modified the milestones: 1.0.3, 1.1 Dec 27, 2018
@mattpap mattpap modified the milestones: 1.1, 1.2 Mar 1, 2019
@mattpap mattpap modified the milestones: 1.1.1, short-term Apr 29, 2019
@hiramf
Copy link
Contributor

hiramf commented May 23, 2019

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

@levaid
Copy link

levaid commented Oct 15, 2019

I would like to +1 this issue. I would like to add labels to some complex data, but they also need background, and only the Label can do it.

@Cuahchic
Copy link

Cuahchic commented Nov 7, 2019

I also would love this feature please!

@garrettseepersad
Copy link

+1

@QingFengpoor
Copy link

+1 . This feature can reduce a lot of trouble.

@mattpap mattpap modified the milestones: short-term, future Feb 20, 2020
@harabat
Copy link

harabat commented May 24, 2020

Any updates on this?

@TarekHC
Copy link

TarekHC commented Jun 12, 2020

Just to show some more interest on this... I give a +1!

@nikeshm
Copy link

nikeshm commented Jun 12, 2020

+1 to this! This feature would certainly help a lot.

@GilShoshan94
Copy link

+1

@jonn-smith
Copy link

This would be very helpful to me as well.

@varunchaturmutha
Copy link

Line break for axis labels!

@RolandRitt
Copy link

RolandRitt commented Sep 16, 2020

+1

2 similar comments
@theresepol
Copy link

+1

@jakobjgu
Copy link

+1

@mullimanko
Copy link

+1

3 similar comments
@shenshan
Copy link

+1

@Patrickens
Copy link

+1

@kansiator
Copy link

+1

@nabilahmed739
Copy link

+1 for text wrapping or multiline in legend labels

@tal-z
Copy link

tal-z commented Aug 16, 2021

+1 here as well!

@mcwrinn
Copy link

mcwrinn commented Sep 8, 2021

+1 ! thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.