When building a report from your data, it's a great time saver to be able re-use formatting on your charts. This also helps you keep the look of your report consistent. In Displayr, there are two systems for making charts (three if you write your own code!). The best way to keep your formatting depends on which system you use. In this post, we show you how to set up templates for the charts in both the Chart and Visualization menus.

The Visualization system

You can create interactive, R-based charts using Insert > Visualization. The basic workflow for reusing formatting for these types of charts is:

  1. Add the chart using Insert > Visualization.
  2. Connect your data using one of the options in the Inputs > DATA SOURCE section of the Object Inspector.
  3. Set up your desired formatting options in the Chart section of the Object Inspector.
  4. Make a copy of your chart using Home > Duplicate.
  5. Change the DATA SOURCE, the chart type, and other options for your new chart.

In the example below, I've changed several of the default chart properties, such as adding a chart title and subtitle, bolding the labels, adding a footer, and changing the color palette.

donut chart

To reuse the same formatting, select the chart, then go to Home > Duplicate which makes a copy of the chart. From the INPUTS section of the Object Inspector, you can change the Chart type and the most of the formatting will be retained from the original chart. In the example below, I've just changed the Chart type to Column. Notice that most of the formatting comes through in the new chart. As there is only a single series, only the first color from my palette is used.

reusing the donut chart formatting in a bar chart

The Chart system

When you make a chart using Home > Chart (or Insert > Chart), there is a built-in template system. We look at this option first.

The following simple Age by Gender table was created in Displayr below. To convert this table into a chart, first select the table. From the Home menu, select the Chart icon drop-down and select a Bar Chart. This changes the existing table into a Bar Chart.

making a bar chart from a table in Displayr

The chart can then be modified by selecting Chart from the menus (note the chart on the page must be selected for the Chart menu to appear). From here, several common chart properties can be modified including the border, legend and labels. Additional properties can be accessed from the Chart section of the Object Inspector.

Displayr ribbon menu

Saving and applying a chart template

Once the chart properties have been modified, these settings can be saved as a chart template. In this example, I've made various random but obvious changes to the chart (removed the x-axis, added a pattern to the bars, modified the color scheme).

new bar chart formatting

Now, if I want to reuse my stunning formatting, I can save the chart as a template. This will make the formatting available to be applied to other charts. To save as a template:

  1. Select/highlight the chart object (Chart appears in the menus at the top).
  2. From the Chart menu, select Save as Template.
  3. Enter a Name for the template.
  4. Click OK.

If I want to apply the template to a different chart in any of my other projects, I can select the chart and from the Chart menu and select the Apply Template icon drop-down. From here I can select my template to apply it to another chart.


two bar charts showing the application of a custom chart template

Try this yourself in Displayr! You can also check out our other helpful tips on visualization!