Skip to content

Commit 6e2f73b

Browse files
spec: add bar-horizontal specification (#1950)
## New Specification: `bar-horizontal` Related to #1946 --- ### specification.md # bar-horizontal: Horizontal Bar Chart ## Description A horizontal bar chart displaying categorical data with rectangular bars extending horizontally from the y-axis. The length of each bar is proportional to the value it represents. This orientation is particularly effective when category names are long or numerous, as horizontal labels are easier to read than rotated vertical labels. Horizontal bar charts excel at rankings, comparisons, and survey results visualization. ## Applications - Displaying survey results with descriptive response options - Showing ranked lists such as top products, countries by population, or employee performance - Creating population pyramid base charts for demographic analysis ## Data - `category` (categorical) - Labels for each bar on the y-axis - `value` (numeric) - Length of the bars representing the measured quantity - Size: 5-20 categories recommended for readability - Example: Survey response counts, country statistics, product performance metrics ## Notes - Bar heights should be consistent across all categories - Consider sorting bars by value for easier comparison (largest to smallest or vice versa) - Use a single color for all bars, or highlight specific bars to draw attention - Ensure adequate spacing between bars for visual clarity - Value labels can be placed at the end of bars or inside them --- **Next:** Add `approved` label to the issue to merge this PR. --- :robot: *[spec-create workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20501876693)* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 529134d commit 6e2f73b

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# bar-horizontal: Horizontal Bar Chart
2+
3+
## Description
4+
5+
A horizontal bar chart displaying categorical data with rectangular bars extending horizontally from the y-axis. The length of each bar is proportional to the value it represents. This orientation is particularly effective when category names are long or numerous, as horizontal labels are easier to read than rotated vertical labels. Horizontal bar charts excel at rankings, comparisons, and survey results visualization.
6+
7+
## Applications
8+
9+
- Displaying survey results with descriptive response options
10+
- Showing ranked lists such as top products, countries by population, or employee performance
11+
- Creating population pyramid base charts for demographic analysis
12+
13+
## Data
14+
15+
- `category` (categorical) - Labels for each bar on the y-axis
16+
- `value` (numeric) - Length of the bars representing the measured quantity
17+
- Size: 5-20 categories recommended for readability
18+
- Example: Survey response counts, country statistics, product performance metrics
19+
20+
## Notes
21+
22+
- Bar heights should be consistent across all categories
23+
- Consider sorting bars by value for easier comparison (largest to smallest or vice versa)
24+
- Use a single color for all bars, or highlight specific bars to draw attention
25+
- Ensure adequate spacing between bars for visual clarity
26+
- Value labels can be placed at the end of bars or inside them
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Specification-level metadata for bar-horizontal
2+
# Auto-synced to PostgreSQL on push to main
3+
4+
spec_id: bar-horizontal
5+
title: Horizontal Bar Chart
6+
7+
# Specification tracking
8+
created: 2025-12-25T08:20:11Z
9+
updated: null
10+
issue: 1946
11+
suggested: MarkusNeusinger
12+
13+
# Classification tags (applies to all library implementations)
14+
# See docs/concepts/tagging-system.md for detailed guidelines
15+
tags:
16+
plot_type:
17+
- bar
18+
data_type:
19+
- categorical
20+
- numeric
21+
domain:
22+
- general
23+
- business
24+
features:
25+
- horizontal
26+
- comparison
27+
- ranking

0 commit comments

Comments
 (0)