# Bar Charts

Bar charts use vertical bars to represent data values, allowing for straightforward comparison of different categories or groups within a dataset.

## When to use Bar Charts

Bar charts are ideal when you want to:

* Compare values across different categories
* Show rankings or top performers
* Display discrete data that doesn't need continuity
* Make side-by-side comparisons easy to read

## Configuring Your Bar Chart

### Setting the X-Axis

The X-Axis represents your categories or groups. Choose a field that contains distinct values you want to compare:

**Best practices for X-Axis:**

* **Categorical fields**: Status, Department, Product Name, Region
* **Single option select**: Priority Level, Stage, Category
* **Text fields**: Customer Name, Project Name
* **Date fields grouped by time period**: When comparing totals across time periods (select a date field like "Order Date", then group by Year, Quarter, or Month)

{% hint style="info" %}
**Using date fields for time periods:** To compare totals across time periods, select a date field (like "Order Date" or "Created Date"), then choose how to group: **Year**, **Quarter**, or **Month**. This is different from line charts—here you're comparing period totals side-by-side rather than showing trends over time.
{% endhint %}

**Example:** For comparing sales by product category, set your X-Axis to the "Product Category" field.

### Adding Series (Y-Axis Values)

Series represent the numeric values you're measuring for each category. Bar charts can display multiple series side-by-side for comparison.

**For each series, you'll configure:**

1. **Y-Axis Value**: The numeric field to measure (e.g., Revenue, Quantity, Hours)
2. **Aggregation Method**: How to calculate the bar height
   * **Sum**: Total of all values in the category
   * **Count**: Number of records in the category
   * **Average**: Mean value for the category
   * **Min/Max**: Lowest or highest value in the category
3. **Series Label**: A descriptive name for what this bar represents

### Example Configuration

**Scenario**: Compare revenue and profit by product category

**X-Axis Configuration:**

* Field: `Product Category`

**Series 1:**

* Label: "Revenue"
* Y-Axis Value: `Revenue` field
* Aggregation: `Sum`

**Series 2:**

* Label: "Profit"
* Y-Axis Value: `Profit` field
* Aggregation: `Sum`

This creates a bar chart with grouped bars showing revenue and profit side-by-side for each product category.

## Single vs. Multiple Series

### Single Series Bar Charts

Perfect for simple comparisons:

* Top 10 customers by revenue
* Task count by status
* Employee hours by department

### Multiple Series Bar Charts

Ideal for side-by-side comparisons:

* Actual vs. Budget by department
* This year vs. Last year sales (X-Axis: Order Date grouped by Quarter, Series filtered by year)
* Planned vs. Completed tasks by project

## Common Use Cases

### Performance by Category

* **X-Axis**: Department or Team
* **Series**: Revenue (Sum), Number of Deals (Count)

### Status Distribution

* **X-Axis**: Status (Open, In Progress, Closed)
* **Series**: Count of Records (Count)

### Regional Comparison

* **X-Axis**: Region or Location
* **Series**: Sales (Sum), Customers (Count)

### Top Performers

* **X-Axis**: Salesperson Name
* **Series**: Total Sales (Sum), Deals Won (Count)

## Tips for Better Bar Charts

1. **Limit categories**: For readability, limit to 10-15 categories. Use filters or sorting to show top/bottom items
2. **Choose appropriate aggregation**: Use Count for frequency, Sum for totals, Average for typical values
3. **Label clearly**: Ensure your series labels clearly describe what's being measured
4. **Use colors effectively**: When using multiple series, the colors will automatically differentiate them
5. **Consider a Stacked Bar Chart**: If you want to show part-to-whole relationships instead of side-by-side comparisons
