Stacked Column/Bar Chart

Unlike conventional bar and column charts where a separate bar/column is displayed for each element of the attribute, in stacked bar/column charts the second attribute groups on the first attribute.

In the below-shown example, there are 2 attributes: Category and Quarter. The quarter attribute is grouped on category attribute; as a result, for each element of the Category attribute all the quarter attribute elements are displayed one above the other.

Inputs Metrics: 1 metric Attribute: At least 2 attributes. Use as Filter Option - Available

stacked column/bar inputs

Stack by Percentage

By default stacked bar/column chart will stack the bars using values. Using the ‘Stack by Percentage’ option we can make the stacked bars height with respective to the percentage contibution to the total stack value.

sbarcolumn percentage

Stack by Metrics

In 4.2 release the major change in stacked bar/column is, in web documents now we can stack using metrics. Please refer the below screenshot to enable this feature.


Adding a line series along with stacked bars/columns

From 4.5 version of the Vitara charts, a new feature is introduced in the Stacked bar/column charts where the user can form a metric series along with stacking the attribute values on the same axis or on different axis.
Metric series can be formed in three ways i.e., Line or Area or Data markers.
Below is the screenshot of a Stacked Column chart where attributes are stacked on one axis and the metric series [line] is formed on the other axis.

To use metric series, the chart should be created with 2 attributes [one as category and the other as break by] and at least 2 metrics [first metric will always be used to define the value of the bars/columns and other metrics can be used to form the metric series]
Let’s see how to create a metric series in below simple steps.

Step 1

Create a stacked bar/column chart with 2 attributes and metrics. Stack by attribute values [i.e drag an attribute into ‘break by’ dropzone]. See the sample screenshot below.

Step 2

Open the property editor and go to series tab

Step 3

Scroll down to see metric selection drop-down at the bottom of the editor. Select a metric with which the series needs to be formed and click on the ‘add’ button next to it, then the series options menu will be opened. See the screenshot.

Step 4

Select all required options for that series and click on ‘Apply’ See the screenshot below.

Then metric series will be applied on the chart in the form of ‘line graph’. See the screenshot below.

Remove the Metric Series

The applied series can be removed if the metric respective to that series is removed from the metric dropzone.

Polar Mode

From the 4.6 version of VitaraCharts, a new feature is added in the Stacked charts where users can enable ‘Polar mode’ i.e, Stacked bar/column chart with a radial value axis. This way of using axes is called Polar coordinate system.

Let’s see how to enable ‘polar mode’ in simple steps.
Step 1:
Create a Stacked Bar/Column chart with a minimum of one attribute and one metric. See the sample screenshot below.
Stacked Polar1

Step 2:
Open the property editor and go to the ‘Stacked Bar/Column’ tab. Enable the checkbox ‘Enable Polar Mode’. See the screenshot.
Stacked Polar2

Then the value axis of the chart will be converted into Polar coordinates. Below screenshot shows the default behaviour of the chart with Polar coordinates.
Stacked Polar3

Polar Mode settings
Polar mode comes up four settings which include Start angle, end angle, Outer Pane Size, Inner Pane Size.
The default settings of Polar mode are
Start Angle: 90, End Angle: 360, Outer Pane Size: 85, Inner Pane Size:20.
We can modify these settings anytime according to our preference. Let’s see some of the settings below
Start angle : 0
End angle : 270
Outer Pane Size : 100
Inner Pane Size : 15
Then chart looks like the below screenshot
Stacked Polar4

All the axes settings available for normal Bar chart are also applicable to Polar coordinate system.

Data labels

We can format the data labels and Stack totals indepently. Below is the screenshots of this option.

Stacked Column/Bar inputs

From 4.6.1 version of Vitara charts, a new option ‘Identify format across the metrics’ is introduced in Data labels tab.

In the stacked charts, the number format of stack totals will be same as the number format of the first metric in the chart. If the value of the first metric is zero or nulls, stacked chart fails to show the stack totals in the custom number format applied on the metrics.

To overcome this limitation we have to enable the option ‘Identify format across the metrics’. When we enable this property stacked chart will not rely on the first metric’s number format, in defining the number format for stack totals, but will check all the metrics avialable in the chart.

In the below example, all the metrics in the a stacked chart are formated to a number format to show all numbers in Millions, and everything below the million should be ‘0’.

Stacked Column/Bar inputs

Stacked Column/Bar inputs

In this example, the values of Profit metric are below 1 Million, so all the values of the profit metric become zeros. As a result, stacked chart fails in indentifying the number format that should be applied to the stack totals.
Hence chart will display stack total in default number format.

Below is the screenshot when the option ‘Identify format across the metrics’ is not enabled.

Stacked Column/Bar inputs

In this use case, to define the number format of the stack totals, chart should consider not just the first metric but the number format of other metrics in the chart. Below are the screenshots, how to enable th eoption ‘Identify format across the metrics’ and the stacked chart after enabling the option.

Stacked Column/Bar inputs

Stacked Column/Bar inputs


In the business point of view, certain part of the chart needs to be highlighted to draw more attention from the desicion makers. For example, highlight the stores where total sales is greater than a specific value or highlight the top 10 products whose sales is high during last year’s winter. Thresholds are very useful objects in these use cases.

Thresholds will display some conditional formatting in a chart to highlight certain data points depending on predefined criteria.The criteria are attribute or metric qualifications. If a qualification’s expression evaluates to TRUE, the report displays the threshold. We can also include markers in thresholds.

To apply thresholds in vitara charts, hover the cursor on the chart. Vitara chart will display an ‘Edit’ button. When you click on this ‘Edit’ button the properties window will pop out. Select the thresholds tab to open threshold editor. In the window you can add a new threshold or delete any existing threshold or modify the existing threshold.

Note: From 4.6 version we can apply thresholds using attributes. The source drop down box in the threshold editor window will list all the attributes and metrics in the chart. we can select an attribute as source and define a threshold condition. The target of the threshold depends on the series of the chart. This means, if the chart series is created using metrics then target drop down box will display the metrics. If we enabled ‘color by’ mode, by adding an attribute to the ‘color by’ drop zone in the dossier’s editor panel, the chart series will be created using attributes. In this case the threshold target drop down box will show all the elements of attribute used in the color by drop zone. In this case we can set threshold target using attribute.

sbarcolumn threshold add

In the threshold editor window apply source, target, threshold condition and the other related information to set a threshold on the chart.

sbarcolumn threshold condition

After giving all the inputs click on ‘Apply’ button.

Background Image

The steps to set a background image for all Vitara charts are explained in backgroundImage.

Small Multiples

Stacked bar/column chart supports small multiples feature. Small multiples feature is explained in smallMultiples.