Substitution Variables
Substitution variables can be used in chart tips, component titles
and table column headings.
Each variable has the format
${variableName}.
The dollar sign and curly brackets
${} indicate that the text is a
variable.
A simple example of a variable might be for the current indicator
name ${indicatorName}.
When the user selects a new indicator the text
${indicatorName} will be automatically
substituted with the name of the selected indicator.
The variables can be combined with regular text like this.
${indicatorName} for date ${date}.
Simple html elements may be used to format your text. In this
example the indicator name is placed on a new line and written in
bold.
${themeName} <br/>
<b>${indicatorName}</b>.
You can also use conditional statements. This one checks if a
filter has been set and writes out 'The filter value is' if that
is the case.
${notEmpty(filterName, 'The filter value is')}
${filterValue}.
Updated when the data changes
-
The name of the geography.
${geogName}
(v671)
-
The name of the theme.
${themeName}
(v671)
-
The name of the indicator.
${indicatorName}
(v671)
-
The name of the date.
${date}
(v671)
-
Values for any indicator properties. Use the name of the
property. Indicators inherit properties from both their parent
theme and geography.
${propName}
(v671)
-
Statistics for the current indicator.
${mean}
(v671)
${median}
(v671)
${count}
(v673)
${sum}
(v671)
${maxValue}
(v671)
${range}
(v671)
${lowerQuartile}
(v671)
${upperQuartile}
(v671)
${interquartileRange}
(v671)
${variance}
(v671)
${standardDeviation}
(v671)
-
Statistics for the scatter plot data.
${correlationCoeff}
(v671)
${rSquare}
(v671)
${gradient}
(v671)
${intercept}
(v671)
Updated when the filter changes
-
The filter name.
${filterName}
(v671)
-
The filter value.
${filterValue}
(v671)
Updated when the legend changes
-
The legend type.
${legendType}
(v671)
Updated when the feature selection changes
-
The selected feature.
${selectedFeature}
(v671)
Updated when the feature highlight changes
-
The feature name.
${featureName}
(v671)
-
The indicator value for the feature.
${indicatorValue}
(v671)
-
Associate values for the feature. Use the name of the associate.
${associateName}
(v671)
-
Values for any feature properties. Use the name of the
property.
${propName}
(v671)
-
Upper limit value.
${upperLimit}
(v671)
-
Lower limit value.
${lowerLimit}
(v671)
Conditional Statements
-
equals (v671)
If
indicator name equals 'My Indicator' write 'My Indicator was
selected'.
${equals(indicatorName, 'My Indicator', 'My Indicator was
selected')}
If indicator name equals 'My Indicator' write 'My
Indicator was selected', else write 'Not selected'.
${equals(indicatorName, 'My Indicator', 'My Indicator was
selected', 'Not selected')}
-
notEquals (v671)
If indicator name does not equal 'My Indicator' write 'My
Indicator was not selected'.
${notEquals(indicatorName, 'My Indicator', 'My Indicator was
not selected')}
If indicator name does not equal 'My Indicator' write 'My
Indicator was not selected', else write 'Selected'.
${notEquals(indicatorName, 'My Indicator', 'My Indicator was
not selected', 'Selected')}
-
empty (v671)
If
indicator date is empty write 'No date available'.
${empty(date, 'No date available')}
If indicator date is empty write 'No date available', else
write 'Date available'.
${empty(date, 'No date available', 'Date available')}
-
notEmpty (v671)
If indicator date is not empty write 'The date is'
followed by the date.
${notEmpty(date, 'The date is')} ${indicator date}
If indicator date is not empty write 'The date is'
followed by the date, else write 'No date available'.
${notEmpty(date, 'The date is', 'No date available')}
${indicator date}
-
greaterThanOrEqualTo
(v671)
If indicator
value >= 10 write 'true'.
${greaterThanOrEqualTo(value, 10, 'true')}
If indicator value >= 10 write 'true', else write
'false'.
${greaterThanOrEqualTo(value, 10, 'true', 'false')}
-
lessThanOrEqualTo
(v671)
If indicator
value <= 10 write 'true'.
${lessThanOrEqualTo(value, 10, 'true')}
If indicator value <= 10 write 'true', else write
'false'.
${lessThanOrEqualTo(value, 10, 'true', 'false')}
-
greaterThan (v671)
If indicator value > 10 write 'true'.
${greaterThan(value, 10, 'true')}
If indicator value > 10 write 'true', else write
'false'.
${greaterThan(value, 10, 'true', 'false')}
-
lessThan (v671)
If indicator value < 10 write 'true'.
${lessThan(value, 10, 'true')}
If indicator value < 10 write 'true', else write
'false'.
${lessThan(value, 10, 'true', 'false')}
-
even (v671)
If
indicator value is even write 'true'.
${even(value, 'true')}
If indicator value is even write 'true', else write
'false'.
${even(value, 'true', 'false')}
-
odd (v671)
If
indicator value is odd write 'true'.
${odd(value, 'true')}
If indicator value is odd write 'true', else write
'false'.
${odd(value, 'true', 'false')}
Maths
-
multiply (v671)
indicator value * 10.
${multiply(value, 10)}
-
divide (v671)
indicator value / 10.
${divide(value, 10)}
-
add (v671)
indicator value / 10.
${add(value, 10)}
-
subtract (v671)
indicator value - 10.
${subtract(value, 10)}
-
min (v671)
minimum value of indicator value and 10.
${min(value, 10)}
-
max (v671)
maximum value of indicator value and 10.
${max(value, 10)}
-
pow (v671)
indicator value to the power of 2.
${pow(value, 2)}
-
sqrt (v671)
Square root of indicator value.
${sqrt(value)}
-
exp (v671)
Exponential value of indicator value.
${exp(value)}
-
log (v671)
Log
value of indicator.
${log(value)}
-
abs (v671)
Absolute value of indicator.
${abs(value)}