> For the complete documentation index, see [llms.txt](https://docs.shimoku.com/dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shimoku.com/dev/elements/charts/bar-charts/stacked-horizontal-bar.md).

# Stacked Horizontal Bar

A **stacked horizontal bar chart** shows the composition of each category in a stacked bar, with each segment representing a sub-category. The bars are oriented horizontally so it's useful when there are lot's of labels or when the labels are very lengthy.

Using the same data as the stacked bar example:

```python
s.plt.stacked_horizontal_bar(
    data=pd.read_csv('file.csv'), x="Segment", order=0,
    x_axis_name='Distribution and weight of the Drivers',
)
```

<figure><img src="/files/SmuSyBJwMQzWb81HqJwJ" alt=""><figcaption><p>Horizontal stacked bar</p></figcaption></figure>

## Variants

By setting the parameter `variant` to the following values the appearance of the chart can be changed:

{% tabs %}
{% tab title="Clean" %}

<figure><img src="/files/XCubYZiyJDOAYgwUWocG" alt=""><figcaption><p>variant="clean"</p></figcaption></figure>
{% endtab %}

{% tab title="Minimal" %}

<figure><img src="/files/KtjKZFZwVNP9j52lUHKu" alt=""><figcaption><p>variant="minimal"</p></figcaption></figure>
{% endtab %}

{% tab title="Thin" %}

<figure><img src="/files/DoWQVruLOnbWKKXiYCo0" alt=""><figcaption><p>variant="thin"</p></figcaption></figure>
{% endtab %}

{% tab title="Clean Thin" %}

<figure><img src="/files/HwvwHfW6Ulp5v8BzN1wZ" alt=""><figcaption><p>variant="clean thin"</p></figcaption></figure>
{% endtab %}

{% tab title="Minimal Thin" %}

<figure><img src="/files/6riVwtVi2m9VVD7vAnMr" alt=""><figcaption><p>variant="minimal thin"</p></figcaption></figure>
{% endtab %}

{% tab title="Shadow" %}

<figure><img src="/files/LGpWZggkDY2jGVhmU9FN" alt=""><figcaption><p>variant="shadow"</p></figcaption></figure>
{% endtab %}

{% tab title="Clean Shadow" %}

<figure><img src="/files/rYipELBmq46HTlxKWU4z" alt=""><figcaption><p>variant="clean shadow"</p></figcaption></figure>
{% endtab %}

{% tab title="Minimal Shadow" %}

<figure><img src="/files/s1V1JU7DlocM2p9iXkU4" alt=""><figcaption><p>variant="minimal shadow"</p></figcaption></figure>
{% endtab %}
{% endtabs %}

{% hint style="info" %}

### Featured Content

[Changing the Menu Path](/dev/building-web-app/menu/changing-the-menu-path.md)\
The `menu_path` can be modified.<br>

[Using the Grid](/dev/building-web-app/grid/using-the-grid.md)

It is possible to use any number of rows.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.shimoku.com/dev/elements/charts/bar-charts/stacked-horizontal-bar.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
