# 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="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FFqucuEJRKxu9Crmq7Dif%2Fwidget-stacked-data.png?alt=media&#x26;token=bccb1dd4-d581-41cf-897c-d679f005edd6" alt=""><figcaption><p>Representation of possible source list</p></figcaption></figure>

<figure><img src="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2Fcuot94Bl6zKPyaVC5jlY%2Fimage.png?alt=media&#x26;token=0794fb1c-57a1-4983-b2a9-b422985583a7" alt=""><figcaption><p>Stacked columns without labels</p></figcaption></figure>

![Stacked Columns Chart with labels](https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FCGCzXbCdmivIrNhqWGjY%2Fimage.png?alt=media\&token=9d19780b-cde0-42a3-b51f-a13cc0068bcb)

**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>
