This article describes the basics of how to create and modify visualizations. It describes the main ways of creating visualizations, and the main ways of modifying visualizations.
The main ways of creating visualizations in Displayr are to:
- Convert data into visualizations
- Select data and then insert a visualization
- Creating empty visualizations and hooking the data up to them. This allows you to hook up visualizations to tables, variable sets, calculations, and other visualizations or to write a calculation directly in the visualization.
- Duplicating an existing table or visualization and changing the type of visualization
- Duplicating an existing visualization and modifying the underlying data
- By writing code in calculations
Once you've created a visualization, there are a number of ways to modify them:
Creating visualizations
Convert data into visualizations
You can select variable sets directly in the Data Sources menu and then go to the Visualization icon in the toolbar. You can also select a table or a calculation on the Page and then press the Visualization icon in the object inspector. Both options will open the visualization selector for you to make a selection.
Select data and then insert a visualization
If data is already selected and the user inserts a visualization, this visualization is automatically linked to the selected data. This can be done for tables, calculations, ranges of cells on tables, variables, and variable sets.
Creating empty visualizations and hooking them up to data
You can also create visualizations by pressing the Visualization icon in the toolbar and then selecting and hooking up the data in the object inspector (Data >Data Source). You can use a wide range of objects in Displayr here, which will be listed in a drop-down. You can also write a calculation directly by selecting Enter a calculation or value (see How to do Calculations in Drop-Down Boxes).
Duplicating a visualization and changing the 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.
Duplicating a visualization and changing 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).
Creating visualizations via code in calculations
There's an infinite number of simple and advanced visualizations that can be created using code. For example:
Modifying a visualization
You can modify the data source, using a rule, and customize the appearance of a visualization using the Chart tab in the object inspector.
Changing 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.
Applying 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.
Changing the appearance of a visualization
When a visualization is selected, you can modify its properties 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.