# Histogram Chart

### What is a Histogram Chart?

A **Histogram Chart** is a type of bar chart that displays the distribution of numerical data. It divides the data range into intervals (called *bins*) and shows how many values fall into each bin. Unlike a bar chart, which is used for categorical data, histograms are ideal for continuous numerical data.

### 💡 Example: Age Distribution in a Population

Imagine you're working with a dataset containing the ages of individuals in a city survey. You want to understand which age groups are most common.

A histogram chart is ideal here, as it can group ages into intervals (e.g., 20–25, 25–30) and show how many people fall into each range.

#### 🔢 Sample Data

| Age Range | Frequency |
| --------- | --------- |
| 20–25     | 15        |
| 25–30     | 42        |
| 30–35     | 28        |
| 35–40     | 18        |
| 40–45     | 10        |
| 45–50     | 7         |

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2Fiw6tZpknabCmlVJLE02l%2Fimage.png?alt=media&#x26;token=70de72fb-682a-4144-8d65-df9f4d940841" alt=""><figcaption></figcaption></figure>

#### 📌 When to Use a Histogram

Use a histogram when you want to:

* Understand **distribution** of numerical data
* Detect **patterns**, **clusters**, or **gaps**
* Spot **outliers** or **skewness**
* Visualize **frequency** or **spread** of values like sales, profit, scores, etc.

***

### 🔁 Common Variants of Histograms

* **Stacked Histogram** – Multiple categories stacked in each bin
* **Normalized Histogram** – Uses percentage values instead of raw counts
* **Cumulative Histogram** – Displays running total across bins

***

### 🔧 Basic Configuration Options

* **Bins**: Define the number or size of intervals
* **Aggregations**: Use `average`, `count`, `sum`, etc.
* **Sorting**: Order by value or category
* **Axis Titles**: Add X and Y axis labels
* **Bar Colors**: Customize chart appearance

***

### 🛠 Step-by-Step Guide

#### 1. Enter Prompt & Proceed

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2FsLHAvCrSELxCugG7VMFA%2Fstep1.jpg?alt=media&#x26;token=c0fe1850-6387-45b0-b94d-60f0a4dc3944" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2FWsmZQI3V6AG6UvRQeSvB%2Fstep2.jpg?alt=media&#x26;token=d4f1781d-e46e-43ac-b93c-2d3ca935a25a" alt=""><figcaption></figcaption></figure>

* On the dashboard, in the “Describe what you are trying to analyze” field, enter a natural language query like:

  ```
  Avg Sales by Region. Show in Histogram
  ```
* Click **Next** to continue.

Infinity interprets your prompt and pre-selects the appropriate chart type and data fields.

***

#### 2. Select Data Source

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2FJidkQhpFjauE4D3ySnkN%2Fstep3.jpg?alt=media&#x26;token=7be0b820-1660-4225-aa62-7b01c9ea1a2b" alt=""><figcaption></figcaption></figure>

* Choose from **previously connected data sources** listed in the dropdown
* Or upload a file in `.csv` or `.xls` format by dragging and dropping it or using the “browse” option
* Example selected dataset: `global_superstore_orders`
* Click **Next** once the dataset is selected

***

#### 3. Configure Histogram Settings

* **Dimension (X-axis):** `Region`
* **Metric (Y-axis):** `Avg(Sales)`
* **Order By:** `Avg(Sales)` (optional sorting)

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2FXfdaskoSHkEmu4khhujp%2Fstep4.jpg?alt=media&#x26;token=af302fc1-aa39-4ab4-a90d-b93f84b22ab7" alt=""><figcaption></figcaption></figure>

Click **Save** once configuration is complete.

***

#### 4. Apply Styling (Optional)

Click **Advanced Editor** for styling and customization.

**Available Styling Options (Summary):**

* **Chart Background** – Set colors or transparency
* **Padding & Zoom** – Adjust space and interactive zoom
* **Series** – Customize bar styles, widths, and colors
* **Legend** – Control placement, visibility, and font
* **Axes** – Label formatting, tick spacing, and scaling
* **Gridlines** – Enable/disable lines and set styles
* **Other** – Tooltips, refresh behavior, and interactivity

These allow fine-tuning your chart for clarity, branding, and presentation-readiness.

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2FEC0gBA8YzgTbzsUlMLqh%2Fadv%20editor%201.jpg?alt=media&#x26;token=3d02a331-939a-467e-83e3-842b82ec2fbc" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2FiL2k9TYwlFeZHNQAU0mJ%2Fstep1.jpg?alt=media&#x26;token=4bd3c7b2-8d02-44a6-832b-caceba8aeef3" alt=""><figcaption></figcaption></figure>

***

### ✅ Summary

You’ve now created a Histogram Chart that reveals the average sales distribution across regions using simple steps and natural language prompts. With advanced customization available, you can tailor the chart to meet different analytical and visual requirements.

Use Infinity's intuitive interface and styling tools to:

* Spot trends instantly
* Support decision-making
* Deliver visually impactful insights
