This article describes how to create a template for setting colors and font styles for all your visualizations. This will save you from having to manually create or copy and paste your visualizations to retain your style settings.
Go to Automate > Browse Online Library > 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 in your project.
To define your color palette:
- Select the template in the Outputs tab, and from the object inspector, go to Inputs > COLOR PALETTE > Color palette, 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, eg, 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 global font size for numbers in Number fonts > Global FONT > Font units
- 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 (Create > Charts > Visualization) or select an existing one in your Report tree.
- Note - the visualization needs to be an R-based visualization and denoted by the R symbol:
- 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.
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 Colors and Fonts options. In particular, the Named Colors option was used to match brand names to a specific color.
Then for the following area visualization (small multiples):
Going to the visualization's Object Inspector > Chart options, the template was selected in the dropdown:
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.
Article is closed for comments.