How to hide popups when there is no data
WARNING: Please note that this help doc uses an older version of our Projection map template. If you are using version 13.0.0 or newer of the template, the visualization will automatically disable popups for regions with no data.
To hide popups for regions that don't have any data associated with them,
{{#if Alcohol consumption (in litres)}}{{Formal name}} drinks {{Alcohol consumption (in litres)}} litres{{/if}}
if
statement, simply wrap your custom content in curly brackets starting with
{{#if}}
and ending with
{{/if}}
. Then, in the opening brackets, type the name of the column that needs to contain content in order to display something in the popup.
{{#if}}
structures by chaining multiple statements that relate to different columns next to each other. This allows you to create conditional content along the lines of "If this has a value, put this… If it has something in another column, put this…", and so on.