User guide

© GeoWise Ltd. 2011
Page 59
visualise | communicate | ENGAGE The InstantAtlas Designer
g the InstantAtlas Area Profile Template User Guide
© GeoWise Ltd. 2013
Hold your mouse pointer over each of the variable names to view a
description. Click on a variable to insert it into the ‘Text’ box.
For the Title component in a Single Map template there are also some logic
tests involved. The first logic test is:
${notEmpty(date, '>> ')}
In plain English this translates as the following:
“If, and only if, the value for date is not null and is not an empty bit of text,
then write out the following text…”
So, the rule for this type of dynamic text entry is:
${test(condition, textIfConditionIsTrue)}
Another example involving the same logic test is the Scatter Plot
component text:
“${notEmpty(scatterplotCorrelation, 'Correlation coefficient (r) = ' +
scatterplotCorrelation + ' >> r-squared = ' + scatterplotRSquare + ',
Regression Equation: y = ' + scatterplotGradient + 'x + ' +
scatterplotIntercept)}
Note that the textIfConditionIsTrue part is “raw” (i.e. it’s the JavaScript code
that will be evaluated if the condition is true). So, in this case, you need to
parcel up the dynamic variables scatterplotCorrelation, scatterplotRSquare,
scatterplotGradient and scatterplotIntercept using the + operator and put
static text in quotes.
The available logic tests are:
empty - ${empty(variable, textIfEmpty)}
notEmpty - ${notEmpty(variable, textIfNotEmpty)}
equals - ${equals(variable, ‘test text’, textIfEqual)}
notEquals - ${notEquals(variable, ‘test text’, textIfNotEqual)}
If you click the ‘Styles’ tab for a text component, the name of any pre-
defined style class controlling the appearance of the text will be listed in the
‘Style Class’ box (Figure 75).