# New Viz - histogram

**URL:** <https://community.holistics.io/t/new-viz-histogram/671>\
**Category:** Feature Suggestions\
**Tags:** visualizations\
**Created:** [January 14, 2022, 5:29pm UTC](https://community.holistics.io/t/new-viz-histogram/671 "2022-01-14T17:29:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_H](https://community.holistics.io/user_avatar/community.holistics.io/alex_h/32/357_2.png) [@Alex\_H](https://community.holistics.io/u/Alex_H)\
**Post date:** [January 14, 2022, 5:29pm UTC](https://community.holistics.io/t/new-viz-histogram/671/1 "2022-01-14T17:29:56Z")

</div>

A histogram is really useful when you have many discrete dimension values that you need to bring together in a chart. Without a histogram, in these cases you need to hard code the value ranges as custom dimensions.

---

<div class="post-metadata">

**Author:** ![tuan.nguyen](https://community.holistics.io/user_avatar/community.holistics.io/tuan.nguyen/32/442_2.png) [@tuan.nguyen](https://community.holistics.io/u/tuan.nguyen)\
**Post date:** [January 18, 2022, 3:01am UTC](https://community.holistics.io/t/new-viz-histogram/671/2 "2022-01-18T03:01:38Z")

</div>

Hey Alex, good idea! I guess with a native histogram feature, you need the flexibility to define the number of buckets and their size?

---

<div class="post-metadata">

**Author:** ![david-ri](https://community.holistics.io/user_avatar/community.holistics.io/david-ri/32/543_2.png) [@david-ri](https://community.holistics.io/u/david-ri)\
**Post date:** [January 18, 2022, 4:29am UTC](https://community.holistics.io/t/new-viz-histogram/671/3 "2022-01-18T04:29:22Z")

</div>

> [@tuan.nguyen](#):
>
> I guess with a native histogram feature, you need the flexibility to define the number of buckets and their size?

Yes, it’s common to define a histogram in one of two ways;

1. Bin Size/Width
2. Number of Bins

But you would usually also get an underflow / overflow option to handle long tails of data.  
I would suggest there is some ‘auto’ logic which tries to give best fit, but also allow the analyst to define the values.

## Examples:

I have a range of integer values, most within 1-10 range, but a few outlier…  
`1,3,4,1,2,8,1,2,6,5,4,7,2,5,99,5,1,8,1,61`

Imagine it’s the ages of people in a classroom perhaps 🙂

Here, I’ve created a histogram using fixed bin width of ‘1’, but this isn’t that useful, as the outliers are skewing by chart

 ![image](https://community.holistics.io/uploads/default/original/1X/92eadf8dd1dd8f0d72d690ea3abb66728be9ca78.png)

This time, I keep a bin width = 1, but set an overflow =10, so anything over 10 gets bundled together.

 ![image](https://community.holistics.io/uploads/default/original/1X/a4e6f4baa3b27e63812c7a6439080937a124d6c5.png)

The other type is setting the number of bins.

Here, I want to bin my data into 5 bins. Because I have a few outliers, my bin size becomes pretty large, and the distribution loses meaning.

 ![image](https://community.holistics.io/uploads/default/original/1X/4e693345cf213bc3014aba02ae90d5d0c904ba7c.png)

Still using fixed number of bins, but setting an overflow again

 ![image](https://community.holistics.io/uploads/default/original/1X/98d3e8c2b3829cff65e244380d257f7865ff1fb5.png)

---

<div class="post-metadata">

**Author:** ![david-ri](https://community.holistics.io/user_avatar/community.holistics.io/david-ri/32/543_2.png) [@david-ri](https://community.holistics.io/u/david-ri)\
**Post date:** [January 18, 2022, 4:30am UTC](https://community.holistics.io/t/new-viz-histogram/671/4 "2022-01-18T04:30:33Z")

</div>

Incidentally, I’d also include ‘box & whisker’ / ‘box plot’ visualisation types, as that’s the other common chart for data distribution.

---

<div class="post-metadata">

**Author:** ![tuan.nguyen](https://community.holistics.io/user_avatar/community.holistics.io/tuan.nguyen/32/442_2.png) [@tuan.nguyen](https://community.holistics.io/u/tuan.nguyen)\
**Post date:** [February 7, 2022, 9:26am UTC](https://community.holistics.io/t/new-viz-histogram/671/5 "2022-02-07T09:26:17Z")

</div>

Thanks David for the examples, they helped me out at the underflow/overflow part!

We have a plan to support Custom charts in Holistics very soon. Let me see if it can cover the histogram as well.
