
I have a ColumnDataSource (source) with three columns and create some text glyphs:
x y score
1 1 12.123456
2 2 99.199999
p.text(x='x', y='y', text='score')
Is there an elegant way to format the glyph (ie, 1 decimal for the score)?
Checking the documentation doesn’t seem to point anything obvious: figure — Bokeh 3.2.0 Documentation
One workaround is to make an extra column in source to store the formatted score and referencing that:
x y score formatted_score
1 1 12.123456 12.1
2 2 99.199999 99.2
p.text(x='x', y='y', text='formatted_score')
But I was wondering if anyone had any suggestions for doing this more elegantly?


