# Donut Charts

Donut charts are a variation of pie charts with a central hole, used to represent proportions of a whole. They make it easy to compare different segments and see how each part contributes to the total.

## When to use Donut Charts

Donut charts are ideal when you want to:

* Show how parts make up a whole (percentage composition)
* Compare the relative sizes of categories
* Display simple distribution of a single dimension
* Emphasize one or two major segments

## Configuring Your Donut Chart

Donut charts work differently from time-series charts. Instead of X-Axis and multiple Series, you configure categories and a single value:

### Setting the Category (Segments)

The category field determines how the donut is sliced. Each unique value becomes a segment:

**Best practices for Categories:**

* **Status fields**: Lead Status, Order Status, Task Status
* **Single option select**: Priority, Category, Type
* **Categorical text**: Department, Product Name, Region
* **Boolean fields**: Active/Inactive, Paid/Unpaid

**Example:** For showing ticket distribution by status, set your Category to the "Status" field.

### Setting the Value

The value determines the size of each segment. You'll specify:

1. **Value Field**: The numeric field to measure (or count of records)
2. **Aggregation Method**:
   * **Count**: Number of records in each category (most common)
   * **Sum**: Total of a numeric field for each category
   * **Average**: Mean value for each category

### Example Configuration

**Scenario**: Show distribution of support tickets by status

**Category Configuration:**

* Field: `Status`

**Value Configuration:**

* Aggregation: `Count` (count records in each status)

This creates a donut chart where each status (Open, In Progress, Closed) is a segment, sized by the number of tickets in that status.

### Another Example with Sum

**Scenario**: Show revenue distribution by product category

**Category Configuration:**

* Field: `Product Category`

**Value Configuration:**

* Field: `Revenue`
* Aggregation: `Sum`

This shows how much each product category contributes to total revenue.

## Understanding the Donut Display

Each segment of the donut represents:

* **Segment size**: Proportional to its value relative to the total
* **Percentage**: Automatically calculated (segment value ÷ total × 100)
* **Actual value**: The raw count or sum for that segment

The center of the donut often displays the total value, providing context for the segments.

## Common Use Cases

### Status Distribution

* **Category**: Task Status, Ticket Status, Lead Status
* **Value**: Count of records
* Shows how work is distributed across different stages

### Revenue by Category

* **Category**: Product Category, Service Type, Region
* **Value**: Sum of Revenue
* Shows which categories contribute most to revenue

### Customer Segmentation

* **Category**: Customer Type, Subscription Tier, Industry
* **Value**: Count of customers OR Sum of revenue per segment
* Shows customer base composition

### Budget Allocation

* **Category**: Department, Project, Cost Category
* **Value**: Sum of Budget or Spending
* Shows how budget is distributed

### Conversion Funnel Stages

* **Category**: Stage (Lead, Qualified, Proposal, Won)
* **Value**: Count of opportunities
* Shows distribution across funnel stages

## Tips for Better Donut Charts

1. **Limit categories**: 3-7 segments work best. Too many small segments are hard to read
2. **Group small values**: Consider filtering or grouping small categories into an "Other" segment
3. **Use meaningful categories**: Ensure your category field has clear, distinct values
4. **Choose the right aggregation**:
   * Use **Count** when you want to show distribution of records
   * Use **Sum** when you want to show distribution of a total value (like revenue)
5. **Add context**: Include a clear chart title explaining what the donut represents
6. **Consider alternatives**:
   * Use a **bar chart** if you have many categories or need precise comparisons
   * Use a **funnel chart** if showing a sequential process

## Donut Chart vs. Pie Chart

Donut charts are generally preferred over pie charts because:

* The center space can display the total value
* They're easier to read when segments are similar sizes
* Multiple donuts can be compared side-by-side more effectively

## Common Questions

**Q: How do I show only top categories?** Use view filters or Sort & Limit settings to show only the top N categories by value.

**Q: Can I have multiple donuts on one page?** Yes! Add multiple chart widgets to a blank page, each configured to show different categorical breakdowns.

**Q: What if I have too many categories?** Consider using a bar chart instead, or filter to show only the most significant categories.

**Q: Can I show percentages instead of values?** Most donut charts automatically display both the value and percentage for each segment when you hover or click on them.
