This article describes how to create a template for setting colors and font styles for all your Displayr visualizations. This will save you from having to manually create or copy and paste your visualizations to retain your style settings. You can specify appearance settings (such as color palettes and font settings) and these get applied automatically to any visualization you hook up to the template.
- From the toolbar, go to Anything > Visualization > Template. This will then give you a preview of all the color, chart, and number font styles that you can set for your visualizations.
To define your color palette:
- Select the output on your page, and from the object inspector, go to Inputs > COLOR PALETTE > Color palette, and select Custom palette.
- Enter the hex values of the desired colors, eg, #5C9AD3 (blue) and #ED7D31 (orange).
- Alternatively, if you select Inputs > COLOR PALETTE > Color palette > Custom gradient, it allows you to transition from one color to another by setting the start and end colors. You also have more advanced options for specifying hex and RGB values under the color picker's More Colors option.
A further custom color setting is Named colors. This is designed for when you want to use defined colors for specifically named items in your visualization, e.g., a brand list.
To use this setting, you should do the following:
- Set the Default color for unnamed values.
- Change the Specify colors using the drop-down, if necessary.
- Enter the name of the first item you want to color in the 'Color name 1' field.
- Select the color using the 'Color 1' color picker.
- Repeat for 'Color name 2' and so on until you have defined all items.
Setting your chart and number fonts
On the Chart fonts tab in the object inspector, you can set global font styles or make changes specific to various chart labels, such as data labels, legends, and X and Y axis titles.
- Update the global font size by updating the number in Chart fonts > GLOBAL FONT > Font size.
- Update the font style by selecting the Global font family from Chart fonts > GLOBAL FONT.
- Update the font color by selecting a color from Global font color under Chart fonts > GLOBAL FONT.
- OPTIONAL: You can make changes specific to various chart labels, such as data labels, legends, and X and Y axis titles by making updates in the corresponding sections in Chart fonts.
Using the visualization template
- Create a new visualization (Anything > Visualization) or select an existing one on your page.
- In the object inspector, under Chart > APPEARANCE > Use template, select your template.
- Under DATA SERIES > Color palette ensure Default or template settings is selected.
Once calculated, your visualization will now apply the color and font settings from your template.
The appearance of the visualization will keep up-to-date with any changes you make to the template (provided you have set everything to Automatic calculations).
This functionality also allows you to create multiple templates. It's just a matter of linking the appropriate template to your visualization. Furthermore, any update to your template settings will flow through to all visualizations that use this template.
In the following example, a template is created and then applied to an area chart visualization.
A template is altered as per the following, using the various COlOR and FONT option tabs. In particular, the Named Colors option was used to match brand names to a specific color.
The default visualization template looks like so:
And was changed to add the brand names and specific colors as well as modify some of the default chart and number font styles:
Then for the following area visualization (small multiples):
Going to the visualization's Object Inspector > Chart options, and in the Use template dropdown selecting the name of the visualization template > template.
Resulting in this automatic change to the appearance:
Color palette This can be one of the standard palettes, or you can create a palette using Named colors: the color of each data series is associated with the name of the data series. The color of missing values with no associated name is specified by Default color. Note that this palette is only used in charts where the color palette dropdown is set to Default or template settings.
These fonts are used in most visualizations (all of them except the ones that are controlled by Number fonts). Note that only the relevant text components for each chart type will be applied to a visualization.
These fonts are used when the template is used in Number in Oval, Number in Rectangle, Number in Donut, Number in Gauge, Number in Bar, Pictograph - Single Icon, Pictograph - Repeated Icons and Use default or template font settings is selected.