> ## Documentation Index
> Fetch the complete documentation index at: https://basedash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Horizontal bar charts

> Compare categories with horizontal bar charts

Horizontal bar charts display bars horizontally and are used for comparing values across categories without any time association. They're perfect for categorical data where you want to show the occurrence of items grouped by categories, similar to vertical bar charts but with horizontal orientation.

## When to use horizontal bar charts

### Perfect for:

* **Category comparisons**: Companies by user size, sales by region
* **Count data**: Number of orders by status, users by plan
* **Ranking data**: Top customers, best-performing products
* **Survey results**: Customer satisfaction scores, preference data
* **Grouped data**: Items grouped by categories without time association

### Not ideal for:

* **Time series data**: Use [timebar charts](/features/chart-types/timebar-charts) instead
* **Continuous data**: Use other chart types for distributions
* **Proportions of a whole**: Use [pie charts](/features/chart-types/pie-charts) instead
* **Very small datasets**: May be overkill for 2-3 categories

## Example queries

### Category comparison

```
Show me companies by user size as a horizontal bar chart
```

### Count data

```
Display number of orders by status as a horizontal bar chart
```

### Survey results

```
Show me customer satisfaction scores by product category as a horizontal bar chart
```

### Grouped data

```
Create a horizontal bar chart of users by subscription plan
```

## Best practices

### Data preparation

* **Sort logically**: Order by value (descending/ascending) for ranking
* **Limit categories**: Keep to 15-20 categories for readability
* **Handle nulls**: Include or exclude null categories appropriately
* **Consistent formatting**: Use the same units and precision

### Visual design

* **Start from zero**: Horizontal bar charts should always start from zero
* **Consistent spacing**: Use uniform bar heights and spacing
* **Clear labels**: Include category names and values
* **Color coding**: Use colors meaningfully (not just for decoration)

### Common use cases

#### Business analytics

* Top customers by revenue
* Best-performing products
* Sales by region or territory
* Performance by team or department

#### Marketing analysis

* Campaign performance by channel
* Conversion rates by landing page
* Customer acquisition costs by source
* Brand awareness by demographic

#### Operational metrics

* Support tickets by category
* Error rates by system component
* Resource utilization by department
* Process efficiency by team

## Advanced features

### Grouped horizontal bars

Compare multiple metrics within categories:

* Revenue vs expenses by department
* Current vs previous period performance
* Target vs actual results

### Stacked horizontal bars

Show composition within categories:

* Revenue breakdown by product line
* Time allocation by project
* Budget allocation by department

### Error bars

Show uncertainty or variation:

* Confidence intervals
* Standard deviations
* Min/max ranges

## Common pitfalls

### Avoid these mistakes:

* **Too many categories**: Creates visual clutter
* **Inconsistent ordering**: Makes comparisons difficult
* **Missing context**: No baseline or comparison
* **Poor color choices**: Hard to distinguish categories
* **No value labels**: Difficult to read exact values

### Data quality issues:

* **Small sample sizes**: May not be statistically significant
* **Outliers**: Can skew the visual representation
* **Missing categories**: Consider whether to include zero values
* **Inconsistent time periods**: Ensure fair comparisons

## Example scenarios

### E-commerce analysis

```
Show me top 20 products by sales volume for the current month
```

### Customer service metrics

```
Display average response time by support tier as a horizontal bar chart
```

### Financial reporting

```
Create a horizontal bar chart comparing quarterly revenue across different business units
```

### Product analytics

```
Show me feature adoption rates by user segment
```

### HR analytics

```
Display employee satisfaction scores by department
```

## Comparison with vertical bar charts

### Use horizontal when:

* Category names are long
* You have many categories (more than 10)
* You want to emphasize ranking
* Space is limited horizontally

### Use vertical when:

* Category names are short
* You have few categories (less than 10)
* You want to emphasize values
* Space is limited vertically

## Related chart types

* **[Timebar charts](/features/chart-types/timebar-charts)**: For time-based comparisons
* **[Pie charts](/features/chart-types/pie-charts)**: For showing proportions of a whole
* **[Tables](/features/chart-types/tables)**: For detailed data display
* **[Number displays](/features/chart-types/number-displays)**: For single metric values
