Kozea / Kozea/pygal

Labels not working

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

Description

Hello,

I tried the labeling function (as follows, identical as the one on documentation) on version 2.0.5 and 2.0.6 and both of them produce the figures (render_to_file) with no labeling-on-hover.

chart = pygal.Bar()
chart.add('First', [{'value': 2, 'label': 'This is the first'}])
chart.add('Second', [{'value': 4, 'label': 'This is the second'}])
chart.add('Third', 7)
chart.add('Fourth', [{'value': 5}])
chart.add('Fifth', [{'value': 3, 'label': 'This is the fifth'}])
chart.render()

Figure is fine, i saw five bars but non of them has "label". I am wondering whether this is a version problem or i am missing some modules. Could you please provide me some advise on this issue?

Thank you very much,
tony

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported chart using the Python snippet, comparing versions 2.0.5 and 2.0.6 and checking both render() and render_to_file(). Inspect how the label values passed to chart.add are represented in the generated figure and hover behavior. Done means the supplied labels appear on hover for the labeled bars, with the unlabeled bar handled consistently.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.