Horizontal bar chart and print values (top) overruns bar
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 419
- PR merge metrics
- No merged PRs in 30d
Description

`bar_chart = pygal.HorizontalBar(
truncate_legend=-1,
legend_box_size=18,
height=1820,
spacing=10,
margin=10,
show_x_labels=True,
show_y_labels=True,
show_legend=False,
include_x_axis=True,
include_y_axis=True,
print_values=True,
print_values_position='top',
print_zeroes=True
)`
Here is a snippet of my code. It is producing the graph above. I would expect the number to start at the end of the bar instead of running into the bar itself. This appears to just be a bug with the horizantal bar chart.
Contributor guide
Research direction
Start by reproducing the issue with the provided pygal.HorizontalBar configuration, especially print_values=True and print_values_position='top'. Trace how HorizontalBar positions printed values relative to bars; done when the value labels no longer overlap the bars in the reported layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100