-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUG] plotting text via figure.text() gives BAD_COLUMN_NAME for text_font key #11044
Comments
( |
ok, thanks for the explanation/how to fix! |
@mattpap I'm not aware of any way to discern whether a given string is a font name or not, so I'm not sure what there is to do except possibly special case a collection of common font names, which won't be able to catch everything. |
Why not check if text_font is a column name, if not then assume it's a font name? |
A user could add the glyph before the data source. i.e., the column might not exist yet, but could be added later. There is no way to know. The only way to actually disambiguate this is to put the burden squarely on the user to tell us explicitly what they intend, e.g.
I suppose we could use an Realistically I think the best we can do is change all the examples to illustrate the above as best practice and reinforce that guidance in the docs. And possibly use an |
ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)
bokeh 2.3.0
python 3.7.4
MacOS Big Sur
Chrome 88.0.4324.192
Description of expected behavior and the observed behavior
In bokeh 2.3.0, if I use the figure.text() method to plot text then setting text_font="arial" gives an error:
and the text is plotted in (I presume) the default font.
In bokeh 2.2.3 there is no error and the text is plotted in Arial.
Example code:
JavaScript console output:
Compared to this for 2.2.3:
Screenshots
compared to 2.2.3:
The text was updated successfully, but these errors were encountered: