This article describes the basics of how to create and modify visualizations. It describes ways to create visualizations and the main ways of modifying visualizations.
The typical ways to create a new visualization are to:
- Convert data into visualizations
- Select data and then insert a separate visualization
- Create an empty visualization and hook the data up
- Duplicate an existing visualization and change the chart type
- Duplicate an existing visualization and change the data source
- Write code in Calculations
Once you've created a visualization, there are a number of ways to modify them:
Creating visualizations
Convert data into visualizations
The quickest way to create a visualization is to turn a table directly into one. To do so, select a table or a Calculation output, and from the object inspector, click the Visualization button to access the selector menu. This will then nest the table within the visualization, but you can toggle back to see the table using the object inspector > Table button. To unnest the table while keeping the visualization, you can expand the visualization item in the Report tree and drag the table item underneath to a different page or a different position in the tree.
If on a Page, it is also possible to select variable sets directly in the Data Sources menu and then go to Visualization in the toolbar. This will automatically create a summary table of the variable and nest it within the visualization.
Select data and then insert a separate visualization
If you want to still see the input data along with the visualization or if you plan on duplicating and/or modifying the data for the visualization later, you can create a visualization output that is separate from your table. Select the data and either from the toolbar or the Report tree hover > + menu select Visualization. This will both create the visualization and link it to the selected data. This can be done for tables, Calculations, and ranges of cells selected on tables (this will be converted to an in-line calculation referencing those cells).
Create an empty visualization and hook the data up
Similar to above, you can create a separate visualization output from your data and hookup data to it later. To insert a blank visualization, select Visualization from either the toolbar or the Report tree hover > + menu. Then you can select your data later on in the object inspector > Data > Data Source section. You can use a wide range of objects in Displayr here, which will be listed in a drop-down. You can also write an in-line calculation directly by selecting Enter a calculation or value (see Method 4 in How to Plot a Subset of a Table on a Visualization Using Point and Click or R Code).
Duplicate a visualization and change the chart type
Once a table has been converted to a visualization, you duplicate the visualization and press the Visualization button in the object inspector to change the visualization.
Duplicate a visualization and change the data source
You can also Duplicate a visualization and then modify its Data Source. If you have created the visualization by hooking it up to data, this is straightforward. If a table was converted into a visualization, this is a bit more nuanced (see Changing the data source).
Create visualizations via code in Calculations
There's an infinite number of simple and advanced visualizations that can be created using R code in a Calculation > Custom Code output. For example:
Modify a visualization
You can modify the data source, using a rule, and customize the appearance of the visualization (fonts, colors, labels, axes, etc) using the Chart tab in the object inspector.
Change the data source
The data used in the visualization is shown in Data > Data Source. If you manually hooked the visualization up to data, you will see the data you selected. However, if you instead converted a table to a visualization, the name of the table will appear. You can either modify the data source by changing the selection in Data Source > Data, or, by modifying the underlying table.
To modify the underlying table of the visualization, you need to hover over the table reference in Data and follow the link. The object inspector will then change, showing the underlying data. You can modify this underlying data and the visualization will update. This is shown in the recording below.
Change the appearance of a visualization
When a visualization is selected, you can modify its properties (i.e. fonts, colors, axes, labels, etc) in the Chart tab. For some visualizations you can click on regions of the visualization itself and the relevant controls will be selected. For others, using menu search (illustrated in Easily Perform Advanced Analysis) is the best way to find options.
Apply a rule
Rules can be used to format the data and the appearance of visualizations. They are discussed in more detail in How to Use Rules in Displayr.
UPCOMING WEBINAR: 10 Market Research Predictions Over the Next 4 Years