Configure the Text to Show
- In the Properties panel, go to Data.
-
Select a Data source mode.
Mode Description Static value To enter your text in a text area. It takes line breaks into account. Note: To localize this text in other languages, click , and select a translation key. You define keys and translation values in the Translation menu. Variable value To show the content of a variable in the visualization. Field value To show dynamic information. This is useful to show the details of a value selected in another visualization by retrieving content from a variable. For example, you can select a value in the Result List visualization, and see more information about it in the Text visualization. Select variable: Select the variable that contains the id or the URI of the object to show in the visualization.
Select field to compare with variable: Select the field to compare with the variable that contains the details to show in the visualization. For example, you can show the details of a field containing countries.
Field: Select the field to show in the visualization.
Expression value To configure a dynamic title or label, you can enter an expression based on the expression language. In your expression, you can use a Variable with
VARIABLES.<variable name>and a Translation key withI18N.<translation key name>.For example, you can make a dynamic title like
Number of cars sold in {{country}}, where the title string is associated with themyKeytranslation key, and{{country}}is a variable:I18N.myKey.replace("{{country}}", VARIABLES.country)If the variable value is
France, you getNumber of cars sold in Franceif English is the preferred language,Nombre de voitures vendues en Franceif French is the preferred language...You can also use Aggregations coming from the RESULT SET of your data query.
Example 1: You can configure a count in the title to get
Number of cars: <count value>. In the RESULT SET, from the Aggregations section, define acount_aggraggregation withCountas function aggregation.
In the visualization, use the
count_aggraggregation in the Expression value:"Number of cars: " + cars.count_aggrExample 2: You can configure the title to display
Car sales in: <set of country values>. In the RESULT SET, from the Aggregations section, define acountries_aggraggregation withTo Setas function aggregation.In the visualization, use the
countries_aggraggregation in the Expression value:"Car sales in: " + cars.countries_aggr.joinToString(separator: ", ", limit: 3)to display a title likeCar sales in: Belgium, Denmark, England...


