# Histogram

The Histogram displays the distribution of data across a continuous (typically time-based) variable, by aggregating the data into bins of a fixed size. Vertical bars show the count of data within each bin.

| Features                                                                               | Quantity | Notes                                      |
| -------------------------------------------------------------------------------------- | -------- | ------------------------------------------ |
| Required [Dimensions](https://docs.heavy.ai/v8.3.0/measures-and-dimensions#dimensions) | 1-2      | Dimension 1 = X Axis, Dimension 2 = Series |
| Required [Measures](https://docs.heavy.ai/v8.3.0/measures-and-dimensions#measures)     | 1        | Measure 1 = Height.                        |

{% hint style="info" %}
You can convert Histogram charts to the New Combo chart format. For more information, see [New Combo charts](https://docs.heavy.ai/v8.3.0/immerse-chart-types/new-combo#duplicating-and-upgrading-other-chart-types-to-new-combo-charts).
{% endhint %}

Histograms can count occurrences of data other than the binned dimension by assigning a series.

Use a Histogram to understand the distribution of your data, and to see areas of unusually high or low density, which would be masked by an aggregate such as *Average*.

Once you choose your measure and dimension, you can edit the labels for the X and Y axes. Click the label and enter your custom text.

### Show Range Chart

You can change the range of values in your chart by "brushing" over the range chart, or by entering fixed start and end values on the X Axis.

### Color Palette

You can use a custom palette to choose the bar color in your chart. By default, data points are colored light blue. You can choose one of 8 colors.

If you set the **Color** dimension, you can assign colors to individual values, or you can assign the same color to several dimension values to visually group them in the chart.

### Custom Measure Formatting

You can also use custom measure formats for the values in your chart. See [Customizing Measure and Date Formats](https://docs.heavy.ai/v8.3.0/measures-and-dimensions#customize-formats).

## Histogram Examples

Choose a **Data Source**. This example uses the official database of [UFO sightings](https://github.com/planetsig/ufo-reports/tree/master/csv-data)

This chart categorizes UFO sightings on the dimension of *Sighting\_Time* and uses the number of sightings as the *measure*.

<figure><img src="https://1128335264-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xvZtvY4UaNnTQRXqbwd%2Fuploads%2Fgit-blob-e9b5f244c42504a8c60e2277f37f2d79caae4adc%2FSS_63.jpg?alt=media" alt=""><figcaption></figcaption></figure>

Adding the **Color** dimension of *shape* visually shows the relative number of sighting types within each time-based bin.

<figure><img src="https://1128335264-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xvZtvY4UaNnTQRXqbwd%2Fuploads%2Fgit-blob-b7f4791c4ae51165146eda60ce96b41a98b5cb4a%2FSS_64.jpg?alt=media" alt=""><figcaption></figcaption></figure>

The records go back to 1905, with very few recorded sightings. Selecting a more recent 10-year block presents information in a more digestible form. For an ad hoc report, you can brush across values in the **Range Chart** to filter a smaller number of bins, or you can enter start and end dates on the x axis for precise values.

<figure><img src="https://1128335264-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xvZtvY4UaNnTQRXqbwd%2Fuploads%2Fgit-blob-e7faf63b6cb9581b58f22b5ba58f4c77f21ce0ae%2FSS_66.jpg?alt=media" alt=""><figcaption></figcaption></figure>

When you set the x axis to a date/time value, you have the option of setting the **BIN** size to month, quarter, or year. Setting the **BIN** size to **1y** lets you compare the aggregate values at a glance.

<figure><img src="https://1128335264-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xvZtvY4UaNnTQRXqbwd%2Fuploads%2Fgit-blob-40497bf6634463b02e176aaeb10c5f31126b6cb8%2FSS_67.jpg?alt=media" alt=""><figcaption></figcaption></figure>

Once you set the boundaries for the x axis, you can turn off the **SHOW RANGE CHART** setting. You can also reduce the number of series displayed by removing their entries on the **COLOR PALETTE**.

<figure><img src="https://1128335264-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xvZtvY4UaNnTQRXqbwd%2Fuploads%2Fgit-blob-1b0294a9bb0d80fda664110e7d8c8102aafcd303%2FSS_68.jpg?alt=media" alt=""><figcaption></figcaption></figure>

You can change the labels on the axes and the chart title to reflect the current state of the information.

<figure><img src="https://1128335264-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xvZtvY4UaNnTQRXqbwd%2Fuploads%2Fgit-blob-da251934a05aaabf66aa78d94bd21a888fe1acab%2FSS_69.jpg?alt=media" alt=""><figcaption></figcaption></figure>
