Heatmap

Overview

You can create a Heatmap by modifying Bar chart in a way that presents values by assigning them a color from defined range of colors - using Bar chart conditional formatting rules.

How to create a heatmap?

Shortcut from panel

In Actions ribbon you will find a panel with shortcuts which create heatmap with latest 12 observations. Mark all series which you want to use and select one of the options:

Build it

To create a Heatmap first you need to have Bar chart in a form of Dynamic table - this is just a simple table but the values will change after series update. By setting color rules you create Heatmap.

Rules panel is available under Chart properties > Chart elements > Rules. In the new window, simply press 'Add rule' and start the process:

You can highlight either 'Text' or 'Background' for each cell. For more information about types (Range, Condition, Rank, Average) see Bar chart conditional formatting rules.

Choosing color ranges

Two colors

After adding a rule, select colors for backgrounds and check in 'Include' to which columns should this be applied. Then press OK. See below paragraphs to learn more about the process.

Three colors

Let's say you want to set three colors on your Heatmap, for high, middle and low values. You need to define two ranges of colors.

For example: 0 to 50th percentile as a range from red to yellow and 50th to 100th percentile as a range from yellow to green. This way you will receive a heatmap showing the highest percentile in green, lowest in red and all others in the colors range accordingly to their values.

Applying rules to chart

You may apply a rule to all visible values in the table, or for each column separately.
You may also decide to which columns apply the rule. Note that first column is the one with descriptions. It's not possible to apply rules by rows.

Multiple rules - different rules for different columns

In one Bar chart you can have different rules for different columns. Each column is a separate entity, and a rule will apply to each column’s values range separately. For more information about Rules see Bar chart conditional formatting rules.

The Rules will be applied in the order they appear and a Rule further down the list can change settings made by an earlier Rule.

Value series

The default setting in 'Value series' is 'First series'. This means that the range used for coloring cells will be based on that column's value range. You can of course choose another series to be base for a range. This is useful in constructing ranking heatmap - see the file in our Examples.

Using other series for color formatting

You may also use other series to define the range of values of plotted series, even the one not used in the chart.

Example: You have one standard series with values and another which is condition-formula:

if(fx;s1<0, 0, 1)

You want to show the actual values on chart and use the formula-series to color them. '0' value if the change was negative and '1' if it was positive. This would look like this:

Examples

Heatmap

In this example, each column is a different indicator. We applied conditional formatting rules based on range of colors to the Bar chart creating a heatmap. Colors are applied 'by column'.

Heatmap - ranking

In this example, we added helper document in-house series to create a heatmap with ranking (by each column). Each country has same color throughout all columns.

Heatmap - USA inflation breakdown

Here we used CPI components and its weights to create a heatmap with values for last year (rolling).

Heatmap - with pictograms

In this example, we used main CPI components and added monochromatic pictogram to each category.

Questions

Can I format within a row instead of a column?

No, formatting works only within columns or whole chart.

Dynamic table

You can create tables as reports, using Bar Charts presentations. The table is created using a bar chart with text columns. Below is an example of what the end result might look like.

How to create a dynamic table?

Shortcut from panel

In Actions ribbon you will find a panel with shortcuts which create dynamic table with latest 12 observations. Mark all series which you want to use and select one of the options:

Build it

  1. Add the series to Series list.
  2. Use analysis (i.e., Scalar) to define the calculations or values you’re interested in.
  3. Add a Bar chart as Presentation, open Graph layout (Ctrl+L).
  4. Add Text-columns displaying values and text. Each column is a separate 'Text'.
  5. Drag the output series under the desired column.

How to copy a dynamic table?

To copy such table right-click on it and select Copy Special. You can find more information about it under How to copy a chart to Office document?.

Example

Bar chart as (dynamic) table

In this example, we calculated Rate of change and then constructed table with text columns.

Chart view size

How to: 

How to set custom size to a chart?

Select a chart and open the Chart view size tab in the command bar. Tick the 'Fixed size' option. This enables you to edit the 'Width' and 'Height' fields by typing in your custom chart dimensions.

'Fixed size' will be applied to all opened charts.

Size settings after version 1.29

This feature is available in Macrobond 1.29 and later.

We have introduced improved options for fixing chart's size:

  • Application dynamic size – Default option. Chart’s size will follow the shape of the application. This is applied to all opened files.
  • Application fixed size – Chart’s size is fixed and do not follow the shape of the application. This is applied to all opened files. It is the same functionality as previous version's 'Chart fixed size'.
  • This chart fixed size – New functionality. The size is stored as a part of the document. When you send a file to somebody, copy chart to Word, or open it again in your Macrobond, it will keep its assigned size.

How to change unit in Chart view size?

After ticking 'Fixed size' in View size it is possible to change Unit from drop-down menu. Options available are 'Pixel', 'Millimeter' and 'Inch'.

How to save custom size for future use?

Open the Chart view size tab in command bar, there tick the "Fixed size" option. This will allow you to adjust Unit, 'Width' and 'Height' of your chart. Next to this is option to add your custom dimensions to the 'Favorite sizes' drop-down list by clicking 'Add'.

This will open additional window which allows to save your custom dimensions as one of 'Favorite sizes' and make it possible to use it in the future.
You can share the defined sizes with your colleagues by saving them in your department account or company account.

How to set size for Style sheet?

This feature is available in Macrobond 1.30 and later.

Since version Macrobond 1.30 you can control the graph size in Style sheet to fit to your publication requirements. Chart size will be applied together with other graphic's settings.

Border, Grid & Margin

How to:

How to remove the borders from a chart?

Click the background of the graph area. In the Border group under the Presentation properties tab, you can adjust settings for the chart border. To remove the border, set the width to “None”.

How to remove the grid lines from a chart?

You can add and remove grid lines from your chart under Presentation properties for the graph area. Click the background of the graph area to access the grid lines group under Presentation properties at the top of the window. Here you can uncheck horizontal/vertical lines.

How to remove the margin around a chart?

Click on a chart and under Presentation properties > Appearance check Graph margin outside. This will remove margin (additional chart area) that ensures graph is not clipped by the upper and lower edge of graph area. Instead, margin will be added to the outside to attempt to avoid clipped or overlapping axis labels.

Editing text parts of chart

It is possible to edit almost any text in Macrobond, to do this you need to double-click on an element you want to edit.

How to:

How to edit the title of chart?

There are two main ways to add title for chart/graph:

  1. The easiest way is to double click on the title and edit the text in the window that opens up.
  2. If you do not see a title to double-click on, you can edit the title under the chart's presentation properties.
  • Click anywhere on the white area around the chart.
  • Open the presentation properties tab.
  • In the Chart elements panel, next to 'Main title' click on 'Edit'.


Under 'Main title' there's edit button for a 'Subtitle' element if you wish to add it. When editing the title, as with any text element, you can add a dynamic text. ,Find more information on dynamic text here: Dynamic Text

How to edit the source text on a chart?

Click anywhere on the white area around the chart and open the presentation properties tab. In the chart elements group, you can control the source description with the option called 'Copyright.'  Click on the 'Edit' button.

Here, you can type your preferred text. You may also want to use the dynamic text option to automatically add the source of the series. For more information about it see Logo & Copyright.

If you don't see your new source description at the bottom right-hand corner of the screen, you may need to change the text color to a darker color. Click around the area where the Macrobond logo was before until you select the box where the source description should go. Once selected, you can change the text color in the presentation properties tab.

Bar chart conditional formatting rules

Overview

Conditional formatting is used to set colors and text properties based on the values defined by a set of rules. This can be used to create Heatmaps, show negative values, highlight largest smallest value and outliers.

Adding Rules

You set up rules in the dialog shown when you press the Rules button in the Bar chart settings under Chart properties > Chart elements. In new window simply press 'Add rule' and start the process:

Rules settings

In the Rules dialog you can define a set of rules that will apply color and style settings to graphs, texts and backgrounds. The text settings refer to the foreground of text or graphs. You can see the result of the rules in the chart as you make changes in the dialog.

For each Rule you select what columns to include ('Include' column) and what data to use for each column ('Value series' column). Note it's not possible to apply rules by rows.

  • You can have different types of Rules - i.e., for some you can select colors for text and background and for some also the text style.
  • The Rules will be applied in the order they appear and a Rule further down the list can change settings made by an earlier Rule.
  • The default setting in 'Value series' is 'First series' which means that the color range will be based on that column's value range.
  • You can base the Rule on data that is not visible in that column. For example, you may have calculated a YoY series and use it to set the color of the actual value. See example under Using other series for formatting.

Range

The Range rule sets the color on a scale from a starting color to and end color. The values will be mapped to the color range by specifying a minimum and a maximum value.

There are several options for selecting the range of values. The default setting will use the lowest and highest values in the data set, but you can also set a manual value, a percent between the highest and lowest or a percentile between highest and lowest.

If there are several series selected for the targets, you can choose if you want the range to be calculated for each target separately or for the union of all series.

When the value range does not cover all values, which can be the case if you have not used the default setting for the range, you can choose if you want values outside of the range to be unaffected by the rule or if the start/end color will be used for values outside the value range.

Condition

The Condition rule allows you to set the color or text style based on a condition such as Less, Greater and Between. If the condition is met, the color or style will be set.

Rank

The Rank rule applies the selected color or text style to the x highest or lowest values. You can select if the number of values should be expressed as the count or percentage of values.

If there are several series selected for the targets, you can choose if you want the range to be calculated for each target separately or for the union of all series.

Average

The Average rule allows you to set formatting based on if the value is above or below the average value or above or below the average +/- n standard deviations, where n is 1, 2 or 3. This can be used to highlight outliers.

If there are several series selected for the targets, you can choose if you want the range to be calculated for each target separately or for the union of all series.

Example

Conditional formatting rules

In this example, we applied conditional formatting rules to the Bar chart table created with Cross sampling analysis with use of lists.

Legend

The legend lists which series were used in a chart along with a legend key. You can edit the legend by clicking on it and adjusting the settings in the Presentation properties tab, above the chart.

Settings

The settings are grouped in four boxes, each for different aspects of the legend. We’ll go through the settings for each box below.

See here pre-1.30 version view

Appearance

Modify things like the background color, text color and font, as well as the following:

Layout mode

Decide how you want the text in the legend displayed: single or multiple columns, or a continuous line (flow).

Sample size/Sample length

Decide how big the sample (line, dot, square, etc.) should be. See Changing length of line or sample size.

Distance

Controls the distance between the element and the next element in the direction of the chart.

Margin

Define how much space you want between the border of the chart and the legend.

Spacing

This setting controls the spacing between legend items.

Show legend

Hide the legend.

Reversed order

Tick this to reverse the order the series are listed in the legend.

By default, the order of the series in the legend will reflect the order of the series in graph layout, and their placement in the chart, from front to back.

Hide forecast

If you have same color for forecasted values on legend you will se two same samples (i.e.; lines). See Removing second (forecast) line from the legend.

Size

You can set the alignment of the legend or, if you have selected a floating legend, you can choose a horizontal or vertical fit for the legend text.

Border

This group contains options for the layout of the border of the legend, such as: color, width and the setting rounded corners.

Content

Location

Set the position of the legend in the chart. This includes an option to freely place the legend anywhere within the chart. Since Macrobond 1.30 it is possible to choose Floating per pane option.

Default legend text

You can choose to edit the automatically generated legend text and add your own text, or use the dynamic properties feature to specify which series attributes you want to use in the legend.

Analysis texts

By default, the analysis text appears in brackets in the legend text. You can remove it, by unticking the Analysis texts box.

List descriptions

By default, the lists description appears in legend for each series. You can remove them, by unticking the List description box.

Graphics

Removing second (forecast) line from the legend

The second line is the color/style for forecast values. To have only one line, go to mark Legend area and under Presentation properties > Appearance mark Hide forecast. This will remove second lines only from legend.

You can also remove double line by disabling forecast from series with formula:

flagforecast(imfweo_de_ngdpd, 0)

or by removing forecast values from series:

if(isforecast(imfweo_de_ngdpd), Null(), imfweo_de_ngdpd)

Changing length of line or sample size

To change line's length, click on Legend area and under Presentation properties > Appearance > Sample length change setting from Auto.

For charts which use sample size instead of a line (i.e., columns, areas, bubbles) you can change size of sample in legend under Presentation properties > Appearance > Sample size.

Text

Editing the text in the legend

There are several ways to take on changing the text in the legend of a chart. You can modify the legend text for one series at a time, or you can edit the default legend to change all series' legend text at one time.

If text (or anything else) was set to Custom, changing setting in higher hierarchy won't work on that element.
Example: You've changed legend description for one line (click on a line > Presentation properties > Content > Graph text: Custom) so changing 'Default legend text' won't affect it.

Edit one line's legend description

Double-click on the graph for which you'd like to modify the legend text.
Alternatively, you can click on the graph once and find the "Edit" button next to graph text under the Presentation properties tab.

Edit the default legend text

To edit all the series' legends at once, click on the legend. Under the Presentation properties tab, click the Edit button next to 'Default legend text' in the Content group.

This is used together with dynamic properties, for instance if you want only to display the country of each series. If text (or anything else) was set to Custom, changing setting in higher hierarchy won't work on that element.

Editing / removing 'lhs' and 'rhs'

See How to edit / remove the axis text: lhs and rhs?

Hiding all legend's texts

Start by clicking on the legend area. Go to the Presentation properties tab in the 'Content' group, untick the checkbox Legend.

To bring the legend back into your chart, click below the x-axis, go to the Presentation properties tab, in the Charts elements panel, tick the Legend checkbox.

Hiding a particular legend's text

Click on the graph of the series for which you want to remove the legend text. Go to the Presentation properties tab, in the Content panel set Graph text to 'Hidden'.

Hiding analysis texts

See How to hide analysis texts like, c.o.p 12 months?

Hiding list descriptions

Click on a legend and under Presentation properties > Content uncheck Show list description.

Legend

Changing position

To change position of legend click on it and go to Presentation properties > Appearance > Location

Note that with Layout mode you can manipulate how legend elements are sorted.

Reversing the order

Click on the Legend area on the chart, then go to the Actions’ group. Under the Presentation properties tab, in Appearance box, locate the Reversed order box. Tick the setting to switch the order of the series in the legend.

Legend text per chart pane

This feature is available in Macrobond 1.30 and later.

Since version 1.30 you can choose to display the legend text per chart pane, so that each chart pane will have a floating legend text flagging series displayed in their corresponding pane.

Labels

Editing labels & Dynamic text

If you want to change a label's text, double-click on it to edit. You can also set new dynamically changing default text by clicking on any label and selecting Presentation properties tab > Text/Content/... panel> Edit default. For more information see Dynamic Text.

Observation labels

Observation labels let you highlight specific points on a graph and label them with a value, a date, or some other text. To remove Observation label press 'Delete'.

Settings

Label's style

By default, an observation label contains the date and value of the observation you select. To modify either its text or its appearance, click on the observation label and use the settings that open in the Presentation properties tab.

Check the Custom style box to get a full set of options you can edit.

Anchor


The anchor is the part of the label that highlights the point on the graph. Here, you can adjust its appearance, for example its style or shape, color, and width. You can also edit the line that connects the anchor to the text and, for example, add an arrow to it.

Background & border
Here, you can edit the appearance of the label’s text box, including its color, size (margin), shape (style), and distance from the graph. You can also edit the font and its size, by clicking '…' next to the font. You can also customize the box’s border.

Range


By default, the range of the observation label starts and ends with the point you selected. Here, you can change that point by writing in a different date or using relative dates. If you input ' +0 ', for example, the label will always be on the last observation.

See more about range under: Highlighting multiple values and series.

How to add an observation label?

There are two ways to add an observation label to a chart:

From the chart

  1. Right-click on the data point you want to label.
  2. Select 'Add observation label'.

From Chart annotations tab

  1. Select observation label under chart annotations.
  2. Click on the point you want to label.

How to add observation labels to other points?

You can add them individually or use Ctrl+C/ Ctrl+V keys to copy. Note that it also copies style settings.

How to add observation labels to all points?

Unfortunately, there is no 'one button' for this. To make it easier use Ctrl+C/Ctrl+V to copy it to all points - it will also copy style settings.

Highlighting multiple values and series

If you input different start and end dates, you can expand the range of observations included in the label. This means that you can highlight several values at once.

You can also highlight several series at once by selecting other series to include in the observation.

In the following example, we highlighted an interesting area of the chart by including a range of values and both series in one observation label.

Axis value labels

Axis value labels let you highlight specific points on a graph axis and label them with a value, a date, or some other text. It can show value label either on x-axis as on y-axis, according to chosen option.

Horizontal axis value labels

To add value label on your x-axis, click on the background of the graph area and open the presentation properties tab at the top of the window. In the elements group, tick the box 'Horizontal axis value labels.' If you have vertical lines in your chart, their x-values will now be displayed.

The labels will by default show the date. To change this, double-click on the label and change the text to your liking.

Vertical axis value labels

To add value label on your y-axis, click on the background of the graph area and open the presentation properties tab at the top of the window. In the elements group, tick the box 'Vertical axis value labels.'

The labels will by default show the last valid value. To change this, double-click on the label and change the text to your liking.

Legend labels

Legend labels let you add description for each series on chart. It can be current legend description, but you can edit them. Each legend label will be displayed in color of a series unless specified otherwise.

For more information about legend see: Legend

How to add legend labels?

Click the background of the graph area. To highlight values on a graph, tick the box next to 'Legend labels' in the Elements box of Presentation properties tab.

Bar chart

Overview

The Bar chart is a way to display category series, usually created using the Scalar or Cross sampling analysis. It can be added only after some of the analyses, the ones which removes 'time' parameter.

It’s a good way to show comparisons between categories or to track changes over time. The graph types you can use are bars, lines, markers, and bubbles.

Settings

The settings for the bar chart are different from most of the other chart types.

Chart elements:

  1. Graph with glyphs (bars)
  2. Main title
  3. Chart area
  4. Header
  5. Axis
  6. Column(s)
  7. Cell
  8. Legend
  9. Source logo & text

When you click on any element of the chart, several tabs appear in the ribbon area with different properties that you can edit. Because there are more settings available, they are divided into many tabs instead of having one Presentation properties tab.

Since version 1.30 of Macrobond, we have implemented improvements that enhance the readability of bar charts.

Now the column headers and footers will wrap the text for column width adjustment without having to hard code the line break in the text box.

Changing default settings

Most properties have a default setting that is applied to the whole chart. You can override a default setting by editing specific elements. The new setting will make field pinned and will no longer use the default value. You can go back to use the default value by unpinning the setting - 'blue pin' will be shown then vertically.

Graph layout

In the Graph layout window, you can add and remove columns. When adding a column, you have the option between displaying values as text or as a graph. Here, you can also adjust the order of the columns, and change the graph types.

By default, a bar chart includes a text column containing the categories’ labels and a graph column with the values displayed as bars. There can also be several graphs within one column - they will be drawn in the order defined in this window.

Graph style

You can present the graph with one of the five available styles: Bar, Stacked bar, Line, Marker, Bubble and Range (which takes two series: one from the start and one from the end of the range). Below, you can see example with Range and Marker:

Chart size

Width

Width can be set to automatic under Chart properties tab > Width in three different ways:

  • Expanding mode – where the width of the chart is a sum of all individual column widths. 
  • Fill mode – where the chart fills the width of the window. 
  • Custom mode – with fixed size.  

When Fill or Custom has been selected, all columns that are not Text columns will be set to proportional mode. You can adjust this and make only some of the columns proportional. The proportions are used to determine the relative size when the size of the chart is changed. 

The width of the columns can also be set explicitly per column. You can define it in the Column properties tab, or you can use the mouse to drag the divider between the columns. 

Height

The height is determined by the size of the header, footer and graph area (and everything inside it). You can adjust default sizes under column defaults in the Chart properties tab > Column defaults panel.

Note that if you change individual element setting they won't be overwritten by the default ones.

Text columns

It is often very convenient to use Dynamic text in text columns. You can edit all the cells in a column at once by editing the Default text of the column. In the below example, we used the dynamic text {s .Value F2}%, to present the value of the series with one decimal followed by a percentage sign.

Graph columns

Here you can select graphic representation of the numbers. Note that different graph style can be added under same Graph column. Available styles are:

  • Bar
  • Stacked bar
  • Line
  • Marker
  • Bubble
  • Range

Symbol columns

You can also add a symbol in a form of mini pie chart. They are designed to show the proportions of two series or magnitude of one value on a scale 0-100. For more information see Symbol chart from bar chart (mini pie charts).

Legend

Bar chart legend works similar to other chart types' legend. Here it has its own panel Legend properties where you can reverse order, hide forecast, change sample size, change alignment etc.

Conditional formatting

Conditional formatting is used to set colors and text properties based on the values defined by a set of rules. This can be used to create heatmaps, show negative values, highlight largest smallest value and outliers.

For more information please see this article: Bar chart conditional formatting rules.

Style sheets

You can define default settings for Bar charts in a Style sheet. Note that the settings for Bar charts are under separate tab in the Style sheet document.

When you apply a new style sheet to an existing Bar chart, there is an option to unpin settings that you have pinned in your chart so that all of the settings from the style sheet will be applied.

If you have a chart that you think looks nice and wish to create a style sheet based on that look, see section under Style sheet.

What analyses work with this chart type?

All types of analyses which remove time parameter and turn series into category series or use such series.

Examples

Bar chart - all possible graph styles

In this example, we created simple Bar chart and modify it with different styles and order on Graph layout.

Bar chart - with vertical line

We created a Bar chart with straight vertical line going through all bars. See method for Scalar and Cross sampling.

Questions

How to adjust the gap between bars?

You can change the distance between columns per observation and the distance between observations. Click on any one of the columns, and the following options will be available under the Column defaults: 

  • Margin –  determines the gap between columns for each observation  
  • Group margin – determines the gap between column groups, meaning between observations 

How to change size of bar/glyph?

Click on each bar and go to Graph properties tab > Content > Bar height.

If you want to change height for all bars/glyphs go to Column defaults tab > Glyph heights. If glyph isn't on default (locked with pin) it won't be affected by this setting.

How to edit the formatting of all the values in a text column at the same time?

Text columns in a bar chart are, by default, formatted individually. You can create a default format by clicking any one of the values and finding one of the following options:

  1. In the Cell Properties tab, go to 'Text properties' panel, and click 'Edit column default.'
  2. In the Column Properties tab, go to 'Cell defaults' panel, and click 'Edit text.'

Both of these options will bring you to the following window, where you can select from a list of formats. For more about these see Dynamic text.