Kozea / Kozea/pygal

Horizontal bar chart and print values (top) overruns bar

Open
#507 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.8k
Forks
419
PR merge metrics
No merged PRs in 30d

Description

![Screenshot 2020-12-09 215523](https://user-images.githubusercontent.com/63600678/101715337-46477f80-3a69-11eb-9a94-357f08f0ac67.jpg)
`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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.