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
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.
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.
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.
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.
Open the property editor and go to series tab
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.
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.
The applied series can be removed if the metric respective to that series is removed from the metric dropzone.
We can format for the data label and Stack Total. You can see the attached screenshots below.
We can set thresholds on metrics using any criteria to show specific colors on the chart. We can also enable data labels for only the values which are highlighted in thresholds. Open the property editor by clicking on the ‘Edit’ button and select the ‘Threshold’ tab.
In the threshold editor window apply source, target, threshold condition and the other related information to set a threshold on the chart.
After giving all the inputs click on ‘Apply’ button.
The steps to set a background image for all Vitara charts are explained in backgroundImage.
Stacked bar/column chart supports small multiples feature. Small multiples feature is explained in smallMultiples.