Skip to content
Browse files

Merge pull request #1157 from ioam/text_alignment

Bokeh TextPlot uses Text parameter settings
  • Loading branch information...
jlstevens committed Feb 27, 2017
2 parents 1652e5b + 3d3f2ed commit e09d665a773af39ab893d2a3c2e63d30bdc94304
Showing with 9 additions and 1 deletion.
  1. +9 −1 holoviews/plotting/bokeh/
@@ -9,9 +9,17 @@

class TextPlot(ElementPlot):

style_opts = text_properties
style_opts = text_properties+['color']
_plot_methods = dict(single='text', batched='text')

def _glyph_properties(self, plot, element, source, ranges):
props = super(TextPlot, self)._glyph_properties(plot, element, source, ranges)
props['text_align'] = element.halign
props['text_baseline'] = 'middle' if element.valign == 'center' else element.valign
if 'color' in props:
props['text_color'] = props.pop('color')
return props

def get_data(self, element, ranges=None, empty=False):
mapping = dict(x='x', y='y', text='text')
if empty:

0 comments on commit e09d665

Please sign in to comment.
You can’t perform that action at this time.