How to Remove a Blank Space Within a Stacked Area Chart
Published: 11 Apr 2023 Last Modified Date: 12 Apr 2023
Question
When different categories are lined up on the same level of a stacked area chart, a blank space is created if there is no data between the different categories.
How to remove a blank space within a stacked area chart as shown here:
Environment
Tableau Desktop
Answer
Since an area with no data between the different categories is NULL, we will change the default behavior for the NULL value to remove the unwanted blank space. Please review the steps below and a sample workbook attached to this article in the far right column under "Attachments".
Change format of the measure.
1. Right-click on Measure. 2. Choose Format. 3. Choose Pane > Special Values (e.g. NULL). 4. Select Show at default Value.
Additional Information
The point of this solution is how NULL values are treated in certain cases where categories are missing. These NULL values are by default not plotted. The data that crosses such a point cannot be connected by a line (or area).
Applying this solution may change the shape of the non-blank area. The shape can change because NULL is now calculated as zero, allowing graphs that were broken by nulls to be connected. The graphs are now drawn in a shape closer to the actual values.
Thank you for providing your feedback on the effectiveness of the article.