This article describes how to use a Dynamic Text Box in Displayr. This feature is when you want to compose sentences or paragraphs on a page to describe your output.
For example:
In this example, customers were asked on a scale from 1 to 10 how likely they were to recommend various companies. The results are described to the right of the table. Rather than cutting and pasting the information into a text box, we can create the text in the Dynamic Text box and have it insert the calculations in the appropriate places for us.
For users comfortable working in R, you can modify the R Code directly in the output or write your own R code from scratch as described in How to Automatically Update Commentary.
Requirements
A Displayr document with tables you want to describe or annotate.
Method
- Create an output you want to include in the description of your results. For example, if you want to calculate the maximum and minimum from the following table, you can
- Click on the Table.
- Select Calculation
> Maximum > Maximum from the toolbar.
- Select Calculation
> Maximum > Maximum from the toolbar.
Resize the resulting boxes and move them to the bottom of your table so they are out of the way
Now you are ready to create your Dynamic Text box.
- Select Anything
> Page Design > Dynamic Text Box from the toolbar.
- From the Text 1 > Data source drop-down menu select Use an existing Calculation
- From the Text 1 > Input data drop-down menu, select your calculation, which in this case is max.output
- From Text 1 > Decimasl shown, specify the number of decimals you want. The default is 0
- From Text 1 > Text before, type the text you want before the calculated value. Use Text 1 > Text after if you have some additional text you want to include after the calculated value.
- The Blank lines after text feature is useful for improving the legibility of the text, for example, for separating sentences or paragraphs.
- From the Text 2 > Data source drop-down menu select Use an existing Calculation
- From the Text 2 > Input data drop-down menu, select your calculation, which in this case is max. output
- From Text 2 >Decimal shown, specify the number of decimals you want. The default is 0
- From Text 2 > Text before, type the text you want before the calculated value. Use Text 2 > Text after if you have some additional text you want to include after the calculated value.
- Click Calculate.
- [OPTIONAL] Use the Appearance > Appearance menu to format the font as you wish to align with your dashboard design.
Next
How to Create a Text Box Filter
How to Automatically Update Commentary
How to Change Font Color Based on Data Using R
How to Add Color-Changing Messages to Your Page When a Sample Size Threshold is Not Met