{"id":14641,"date":"2015-09-29T13:10:09","date_gmt":"2015-09-29T12:10:09","guid":{"rendered":"https:\/\/help.instantatlas.com\/dashboard-builder-desktop\/desktop-user-guide\/the-instantatlas-designer\/creating-a-new-design\/button\/text-properties\/"},"modified":"2020-11-26T16:01:07","modified_gmt":"2020-11-26T16:01:07","slug":"text-properties","status":"publish","type":"page","link":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/en\/welcome\/desktop-user-guide\/the-instantatlas-designer\/creating-a-new-design\/button\/text-properties\/","title":{"rendered":"Text"},"content":{"rendered":"<p>If you view the properties for a text component, you will see that you can specify a rotation value in degrees for display of the text in the report. You will also see a \u2018Use word wrap?\u2019 checkbox and \u2018Word wrap at\u2019 box. If you select the \u2018Use word wrap?\u2019 checkbox you will then be able to enter a value into the \u2018Word wrap at\u2019 box. This determines how far to the right text will run before wrapping onto a new line.<\/p>\n<p><a href=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2020\/11\/TextProperties.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2020\/11\/TextProperties.png\" alt=\"\" class=\"alignnone size-full wp-image-33977\" width=\"276\" height=\"413\" srcset=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2020\/11\/TextProperties.png 276w, https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2020\/11\/TextProperties-200x300.png 200w\" sizes=\"auto, (max-width: 276px) 100vw, 276px\" \/><\/a><\/p>\n<p>Text components can contain dynamic variables which are enclosed with ${&#8230;}. Any text that is not enclosed in ${&#8230;} is static. Dynamic variables (along with the logic tests discussed below) do bring a lot of flexibility to the look and feel of reports. Dynamic text can also be placed in the title bars of the components or in the table column headers.<\/p>\n<p><a href=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2020\/11\/TextVariables-1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2020\/11\/TextVariables-1.png\" alt=\"\" class=\"alignnone size-full wp-image-34039\" width=\"276\" height=\"468\" srcset=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2020\/11\/TextVariables-1.png 276w, https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2020\/11\/TextVariables-1-177x300.png 177w\" sizes=\"auto, (max-width: 276px) 100vw, 276px\" \/><\/a><\/p>\n<p>The image above shows the properties for a text component with dynamic text variables. You can edit the static text and can also add and delete dynamic variables. Right click in the \u2018Text\u2019 box of the dialog to view the list of dynamic variables available. Hold your mouse pointer over each of the variable names to view a description. Click on a variable to insert it into the \u2018Text\u2019 box. Clearly, the text will not be displayed in the report as ${themeName} &gt;&gt; ${indicatorName} ${notEmpty(date, &#8216;&gt;&gt; &#8216;)} ${date} ${notEmpty(filterName, &#8216;&gt;&gt; Filter: &#8216;)} ${filterName} ${notEmpty(filterValue, &#8216;&gt;&gt; &#8216;)} ${filterValue}. Rather, it might be displayed as shown in the image below.<\/p>\n<p><a href=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2015\/08\/figure73.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2015\/08\/figure73.png\" alt=\"figure73\" class=\"alignnone size-full wp-image-12871\" width=\"965\" height=\"66\" srcset=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2015\/08\/figure73.png 965w, https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2015\/08\/figure73-300x21.png 300w\" sizes=\"auto, (max-width: 965px) 100vw, 965px\" \/><\/a><\/p>\n<p>You can see that in this case, themeName resolves as \u2018Social deprivation\u2019, indicatorName as \u2018% of population unemployed\u2019, date as \u20182005\u2019, filterName as \u2018Zones\u2019 and filterValue as \u2018Edinburgh South\u2019.<\/p>\n<p>For the text found in the title of the Map component there are also some logic tests involved. These can be applied to any text strings to prevent errors where no data is associated with the text variable. The first logic test is:<\/p>\n<p>${notEmpty(date, &#8216;&gt;&gt; &#8216;)}<\/p>\n<p>In plain English this translates as the following:<\/p>\n<p>\u201cIf, and only if, the value for date is not null and is not an empty bit of text, then write out the following text\u2026\u201d<\/p>\n<p>So, the rule for this type of dynamic text entry is:<\/p>\n<p>${test(condition, textIfConditionIsTrue)}<\/p>\n<p>Another example involving the same logic test is the Scatter Plot component title text:<\/p>\n<p>\u201c${notEmpty(scatterplotCorrelation, &#8216;Correlation coefficient (r) = &#8216; + scatterplotCorrelation + &#8216; &gt;&gt; r-squared = &#8216; + scatterplotRSquare + &#8216;, Regression Equation: y = &#8216; + scatterplotGradient + &#8216;x + &#8216; + scatterplotIntercept)}\u201d<\/p>\n<p>Note that the textIfConditionIsTrue part is \u201craw\u201d (i.e. it\u2019s 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.<\/p>\n<p>The available logic tests are:<\/p>\n<ul>\n<li>empty &#8211; ${empty(variable, textIfEmpty)}<\/li>\n<li>notEmpty &#8211; ${notEmpty(variable, textIfNotEmpty)}<\/li>\n<li>equals &#8211; ${equals(variable, \u2018test text\u2019, textIfEqual)}<\/li>\n<li>notEquals &#8211; ${notEquals(variable, \u2018test text\u2019, textIfNotEqual)}<\/li>\n<\/ul>\n<p>If you click the \u2018Styles\u2019 tab for a text component you can customise\u00a0your text using &#8216;Custom Style&#8217; or set to a pre-existing style\u00a0class by deselecting check box &#8216;Use custom style setting&#8217; and choosing from the &#8216;Style Class&#8217; drop down.<\/p>\n<p><a href=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2020\/11\/TextPropertiesStyles.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2020\/11\/TextPropertiesStyles.png\" alt=\"\" class=\"alignnone size-full wp-image-33980\" width=\"305\" height=\"598\" srcset=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2020\/11\/TextPropertiesStyles.png 305w, https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-content\/uploads\/sites\/31\/2020\/11\/TextPropertiesStyles-153x300.png 153w\" sizes=\"auto, (max-width: 305px) 100vw, 305px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you view the properties for a text component, you will see that you can specify a rotation value in degrees for display of the text in the report. You will also see a \u2018Use word wrap?\u2019 checkbox and \u2018Word wrap at\u2019 box. If you select the \u2018Use word wrap?\u2019 checkbox you will then be &hellip; <a href=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/en\/welcome\/desktop-user-guide\/the-instantatlas-designer\/creating-a-new-design\/button\/text-properties\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Text<\/span><\/a><\/p>\n","protected":false},"author":22,"featured_media":0,"parent":14471,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-14641","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/pages\/14641","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/comments?post=14641"}],"version-history":[{"count":0,"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/pages\/14641\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/pages\/14471"}],"wp:attachment":[{"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/media?parent=14641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}