Commit d37bbb17 authored by Sanjay Yadav's avatar Sanjay Yadav

ENH: Enhancement in bullet chart data text position.

parent c0621873
Pipeline #33244 passed with stage
in 1 minute and 9 seconds
......@@ -835,9 +835,10 @@ def bullet(shape, spec, data):
else:
_data_text = '{}'.format(spec['data']) if data_text is True else data_text
parent = data_rect._parent
text_width = (_width if orient == 'vertical' else _hight) * len(_data_text)
text_width = (_width if orient == 'vertical' else _hight * 2) * len(_data_text)
_xaxis = xaxis if orient == 'vertical' else x + scaled - text_width
parent = parent.add_textbox(_xaxis, yaxis, text_width, text_width / len(_data_text))
parent = parent.add_textbox(_xaxis, yaxis - (height / 4.0),
text_width, text_width / len(_data_text))
data_txt_style = style.get('data', {})
data_txt_style['color'] = data_txt_style.get('color', _color.contrast(fill))
default_align = 'left' if orient == 'vertical' else 'right'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment