This article includes a customized template of Table with Custom Formatting (originally from Visualization > Specialty Tables), which can additionally show significance and apply colors via rules.
Requirements
- A Displayr document.
- A standard table or R table that references a standard table. The significance and highlighting functionality only works when based on a table that still includes all the original table attributes that are stored in the background. The rule of thumb is that if significance results and a highlighting Rule display on a table, when you apply the template, it will keep this behavior. A combined R table, on the other hand, will lose these attributes, and neither significance nor highlighting will work on this table prior to applying the template.
- You wish to use Table with Custom Formatting and require significance testing and/or custom coloring.
Method
Saving the template to your Displayr Cloud Drive
By saving the template to your cloud drive, it will then be available to use in any document in your account.
- Download the template file from here.
- From your account, you can access the cloud drive at the top right of the page via your Initials icon > Displayr Cloud Drive.
- Select the appropriate location and press + Upload.
- Select the downloaded template file and press Upload.
Applying your template to a table
You can apply this template to any table that does not already have either the template or the built-in Table with Custom Formatting option applied.
- Right-click your table > Apply Template.
- Search for the previously saved template in the appropriate folder and select it.
- Press Apply.
Re-saving your template
If you wish to change the default settings of the template with those that you use most often, you can save this back to the cloud drive.
- Make the changes you want to save as default.
- Right-click your custom formatted table > Save as Template.
- Select the appropriate name and location.
- Press Save.
Options
General
The general settings for the Table with Custom Formatting still apply. The following are additional options.
Vertical Scrollbar
Under Chart > Row Header in the object inspector , you can tick Show vertical scrollbar when overflows and set Row height in pixels. When the output no longer fits within the confines of the output, it will automatically add the scrollbar.
Significance Testing
Under Chart, there is a group called Significance, which lets you include the significance results from the source table.
1. Show significance
Font colors – Show significant cells by highlighting the font based on the color picker selections.
Arrows – Show significant cells by including a highlighted arrow based on the color picker selections.
Arrows and Font colors – Show significant cells by highlighting the font and including a highlighted arrow based on the color picker selections.
Cell color – Show significant cells by highlighting the background color based on the color picker selections.
2. Color pickers
Higher – The color of significantly higher results.
Lower – The color of significantly lower results.
3. Significance Icon (for Arrows and Arrows and Font colors only)
Default Arrow – Use the built-in arrows.
Custom Arrow – Use the arrow icons from Font Awesome.
Custom Triangle – Use the caret icons from Font Awesome.
Icon font size – Set the pixel size of the custom arrows.
Highlighting Cells and Font
Select any color-based rule via the object inspector > Data > Rules > + > Highlight, Top/Bottom, Color Scales, or Other Color, and it will retain the highlighting in the custom formatted table.
For example, selecting Highlight > Color Scales > Custom will produce the table at the beginning of this article.
Note:
- Any table cells that are not highlighted by a rule will revert to the color selected under Chart > Cells > Fill color.
- When Show significance is not set to No, these color settings will take precedence over any highlighting made by a rule.
- Only colors applied by a rule will be maintained. Manual cell formatting changes to the source table are ignored.
- Under Chart > Font, tick Switch font color with background color to instead apply the cell coloring from the rule to the cell font colors. If no rule has modified the source table's cell colors, this option will set the font from Chart > Cells > Fill color.
Next
How to Create an Autofit Table
How to Create and Apply a Visualization Template