Kozea / Kozea/pygal

x_labels are no places next to values

Open
#488 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

```python
config = pygal.Config(
fill=True,
show_legend=False,
print_zeroes=False,
print_values=True,
print_labels=False,
print_values_position='top'
)
bar_chart = pygal.HorizontalBar(config)
bar_chart.add('', 1)
bar_chart.add('', 0)
bar_chart.add('', 4)
bar_chart.add('', 5)
bar_chart.add('', 3)
bar_chart.add('', 2)
```

![image](https://user-images.githubusercontent.com/16578570/72653130-cb293680-3989-11ea-85d9-8a54fcd01271.png)

```python
config = pygal.Config(
fill=True,
show_legend=False,
print_zeroes=False,
print_values=True,
print_labels=False,
print_values_position='top'
)
bar_chart = pygal.HorizontalBar(config)
bar_chart.add('', 1)
bar_chart.add('', 0)
bar_chart.add('', 4)
bar_chart.add('', 5)
bar_chart.add('', 3)
bar_chart.add('', 2)
bar_chart.x_labels = ['a','b','c','d','e','f']
```

![image](https://user-images.githubusercontent.com/16578570/72653194-0cb9e180-398a-11ea-94be-76630a9ffb3c.png)

Contributor guide

Open the contributing guide

Research direction

Start by running the two Python snippets against pygal and compare the HorizontalBar output with and without x_labels. Trace the label and value positioning used by HorizontalBar, then add a regression test for the reproduced case. Done means x_labels are placed next to their corresponding values without breaking the existing output.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.