# Horizontal Bars/Pins

## Horizontal Bars/Pin <a href="#horizontal-barspin" id="horizontal-barspin"></a>

The display style property, which can be accessed from the hamburger menu, allows the user to display any given individual metric as a horizontal bar or horizontal pin’s.

It can display the scaling as bars and pins.Hover onto a metric for which the trendlines need to be applied so that the hamburger button will be displayed. Click on the hamburger button, then a menu will be opened. Hover the mouse onto ‘Display Style’, then a submenu will be opened which has the trendline charts. Please refer the below screenshot:

<figure><img src="https://106821559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIDde50GEkigLbPmGgLx%2Fuploads%2Ff74cw8noFY6GvcqpqiDL%2Fimage.png?alt=media&#x26;token=eeeb27e6-06c7-4150-9ce2-63a1e5375759" alt=""><figcaption></figcaption></figure>

First, for a metric, apply the ‘Horizontal Bars/Pins’ trendline, and then format the bar/pin color and negative color. open the format window, then set the color (e.g Green). Click the ‘Apply’ button

<figure><img src="https://106821559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIDde50GEkigLbPmGgLx%2Fuploads%2F6lT5beGyH3eCEzyMkgg6%2Fimage.png?alt=media&#x26;token=c2ad6788-1d0d-4010-ab64-7a8bf126915b" alt=""><figcaption></figcaption></figure>

In our case, we’re displaying sales and profits by region and year, with horizontal bars for metric “profit” and horizontal pins for metric “sales”.

<figure><img src="https://106821559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIDde50GEkigLbPmGgLx%2Fuploads%2FZO6tCsuPjePcxP1j39K8%2Fimage.png?alt=media&#x26;token=43aec3a2-b82e-4ed5-93f3-2370918a8162" alt=""><figcaption></figcaption></figure>

## Scaling across cells for Horizontal Bars and Pins <a href="#scaling-across-cells-for-horizontal-bars-and-pins" id="scaling-across-cells-for-horizontal-bars-and-pins"></a>

We have introduced a new Scaling option which can be found from the Hamburger tab in the Display Option under More Options.

The chart scaling is set to ‘Apply at each cell’ by default; to allow scaling, change the Scale option to ‘Same across cells.’

<figure><img src="https://106821559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIDde50GEkigLbPmGgLx%2Fuploads%2FtWSJWA7vRXERHOkcVPQy%2Fimage.png?alt=media&#x26;token=aed52803-3ed0-458a-ac2b-b5419c173da6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://106821559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIDde50GEkigLbPmGgLx%2Fuploads%2FKqOoapqPeA4ilEameonS%2Fimage.png?alt=media&#x26;token=0d55e3cb-8a4d-47c3-a222-b280e3a8b4f2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://106821559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIDde50GEkigLbPmGgLx%2Fuploads%2FJPHjTOokVsl5Ra56ZcXb%2Fimage.png?alt=media&#x26;token=4299f334-d829-4980-a646-b9c0d374b34e" alt=""><figcaption></figcaption></figure>

The chart scaling is set to ‘Apply at each cell’ by default; to allow scaling, change the Scale option to ‘Same across cells.’

### How Horizontal Bars or Pins Work When All Values Are the Same? <a href="#how-horizontal-bars-or-pins-work-when-all-values-are-the-same" id="how-horizontal-bars-or-pins-work-when-all-values-are-the-same"></a>

The Horizontal Bars/Pins visualization represents data values using horizontal bars whose lengths and directions reflect the distribution of values within a column. The bar appearance dynamically adjusts depending on whether the column contains positive, negative, or zero values.

**Display Logic**

The visualization adapts based on the type of values present in the column:

* All **Zero** Values: If all values in the column are zero (e.g., \[0, 0, 0, 0]), the bar appears empty, indicating no positive or negative data distribution.
* All **Positive** Values: If all values in the column are positive (e.g., \[1, 1, 1, 1]), the visualization displays a full-length positive bar, representing that all data points are positive.
* All **Negative** Values: If all values in the column are negative (e.g., \[-1, -1, -1, -1]), the visualization displays a full-length negative bar, representing that all data points are negative.

The screenshot below illustrates this behavior.

<figure><img src="https://docs.vitaracharts.com/~gitbook/image?url=https%3A%2F%2F230207405-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOuiTPVEbVQnzR38vviPf%252Fuploads%252FL9wZgJMz8uKqHEnU92nt%252Funknown.png%3Falt%3Dmedia%26token%3Df812bcb6-3307-47a1-b556-bd8d6b7ea82c&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=d8bdcb3&#x26;sv=2" alt=""><figcaption></figcaption></figure>
