> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/wemtipsandtricks/widgets/advanced-charts/stacked-columns-chart.md).

# Stacked Columns Chart

The Stacked Columns Chart shows the contribution to trends in the data. This is done by stacking lines on top of each other. Stacked Line charts are used with data that can be placed in an order, from low to high. The charts are used when you have more than one data column that all adds up to the total trend.

{% hint style="info" %}
You can find a more in depth explanation about the stacked column on [this](<https://apexcharts.com/javascript-chart-demos/column-charts/stacked/ >) page: [https://apexcharts.com/javascript-chart-demos/column-charts/stacked/ ](<https://apexcharts.com/javascript-chart-demos/column-charts/stacked/ >)
{% endhint %}

Datamodel&#x20;

The Stacked Columns Chart uses a single list or filtered list for its source values. This list has the fields for the Series and Categories on each row. From this list a field is selected for the 'Values', the widget will then iterate over this list and use the indicated field to generate the values shown in the widget. This field must be numeric type. The categories and series properties are then set to respective category and series field from the source list. So this list will contain the following: &#x20;

1. Numeric field, for holding the values to show on the stack - per specific category and series&#x20;
2. Text field, to hold the specific Category value that is displayed along the other axis from the values: for example, the Month Name to show values per month.&#x20;
3. Text field, to hold the specific Series value for which the Value should be applied (like years, and if they hold a numeric value, just use the ToString(\[field]) in the widget property) for example to show the different Total Values for the same month in Categories but with a different color per year.&#x20;

<figure><img src="/files/OTgFzoNNdZqj3P7aOXJE" alt=""><figcaption><p>Representation of possible source list</p></figcaption></figure>

<figure><img src="/files/qmJJDSPWJZikUYX6WKyt" alt=""><figcaption><p>Stacked columns without labels</p></figcaption></figure>

![Stacked Columns Chart with labels](/files/30JF10Xg2mehQbtmsjEH)

**Properties of Stacked Columns Chart**

<table data-header-hidden><thead><tr><th></th><th width="150"></th><th width="150"></th><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Property Name</strong></td><td><strong>Data type</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td><td></td><td><strong>N°</strong></td></tr><tr><td>Data source</td><td>List</td><td>Data Model</td><td>Data sourcelist for the widget.</td><td></td><td>1</td></tr><tr><td>Series</td><td>Text</td><td>Expression</td><td><p>This field is used to create</p><p>different groups from the</p><p>same data source.</p><p>It's not required.</p></td><td></td><td>2</td></tr><tr><td>Categories</td><td>Text</td><td>Expression</td><td>To set the categories of the chart.</td><td></td><td>3</td></tr><tr><td>Values</td><td>Number</td><td>Expression</td><td><p>Values to be used for each</p><p>series.</p></td><td></td><td>4</td></tr><tr><td>Horizontal</td><td>Boolean</td><td> </td><td>To set or not in horizontal form., (yes, no).</td><td></td><td>5</td></tr><tr><td>Height</td><td>Number</td><td>Expression</td><td><p>Set height of the chart.</p><p>Type number.</p></td><td></td><td>6</td></tr><tr><td>Value Prefix</td><td>Text</td><td>Expression</td><td>To set the value of the prefix.</td><td></td><td>7</td></tr><tr><td>Value Postfix</td><td>Text</td><td>Expression</td><td>To set the value of the postfix.</td><td></td><td>8</td></tr><tr><td>Tool Tip Prefix</td><td>Text</td><td>Expression</td><td>To set the prefix of the tooltip.</td><td></td><td>9</td></tr><tr><td>Tool Tip Postfix</td><td>Text</td><td>Expression</td><td>To set the postfix of the tooltip.</td><td></td><td>10</td></tr><tr><td>Show Data Labels</td><td>Boolean</td><td>Expression</td><td><p>Display the labels on</p><p>render.</p></td><td></td><td>11</td></tr><tr><td>Label Decimals</td><td>Number</td><td>Expression</td><td>To set the quantity of decimals of the labels.</td><td></td><td>12</td></tr></tbody></table>


---

# 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.wem.io/platform/wemtipsandtricks/widgets/advanced-charts/stacked-columns-chart.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.
