A link visual enhances your applications by accessing external sources of information. These sources may be either static URL addresses, or dynamic — results of searches to which you pass a name of a variable used in the dataset.
The following steps demonstrate how to create a new link visual for dataset World Life Expectancy
[data source samples.world_life_expectancy
]. In this exercise, we will pass the variable country
to the Wikipedia site.
World Life Expectancy
[data source samples.world_life_expectancy
]; see Creating Visuals.In the visuals menu, find and click link (row 5, column 4).
Note that the shelves of the visual changed. The only shelf is URL.
In the URL, enter the following text:
https://en.wikipedia.org/wiki/<<country:Afghanistan>>
Click Refresh Visual.
The page specified in the URL appears.
Click (pencil icon) next to the title of the visualization to edit it, and enter the new name.
World Population - Country UTL
.At the top left corner of the Visual Designer, click Save.
Extra set-up is required to see the behavior of a dynamic link visual. You must complete the following tasks:
To use this visual to see the Wikipedia page for a specific country, follow these steps.
Click Edit next to the title of the application.
By default, it should be set to Untitled
.
World Population - Country UTL
.At the top left corner of the Visual Designer, click Save.
In Edit mode, left-click on the visual chart, and select Modify click behavior.
In the Pick an app modal window, below To set this selection, pick an app below, select World Life Expectancy.
After the modal window changes, select World Population - Composite.
At the top left corner of the Visual Designer, click Save.
[Optional] While in Edit mode, to ensure that the settings work,
When using the app World Population - Composite, notice that clicking on the specific bars that represent a country changes the Wikipedia page to match the country.