Pyramid/Demography bar chart

Overview

You can create Age Pyramid/Demography chart by modifying Bar chart.

How to create a simple pyramid chart?

Finding data

Each country has a data set from United Nations regarding age groups. This data also includes projections in various fertility variants. You can find it under Concept & Category data-tree:
Concept & Category > All Sources > Demography > UN > World Population Prospects > Annual Population
Or you can navigate in Country & Region database view to country node to check if they have such data from National Source:
Country & Region > Japan [jp, Region] > Demography [demo, Category] > Population by Sex
For more information about searching data see Finding data.

Which analysis can I use?

To show data in Bar chart you need to convert time series into category series. The best analyses for this purpose here is Scalar and Cross sampling.

Displaying age pyramid

  1. Use Scalar analysis to select the year with Calculations 'Last' or 'Value at.'
  2. Choose in the Output series panel 'Partition into: 2' to create two separate data sets.
  3. Add Bar chart, open Graph panel (Ctrl+L).
  4. Each data set add under different Graph column.
  5. On chart, click on any bar on the left and in ribbon tick box under Axis properties > Reverse.

Examples

South Korea demography Bar chart (with proportions)

In this example, we created population pyramid with additional text column with proportion of age group in the whole population.

Japan demography Bar chart

In this example, we created population pyramid and compared current data with older data (shown as a line). Next to it we added a stacked bar chart showing different approaches to presenting population data.

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 > 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.

Bubble chart

For elements not mentioned here see Elements of the chart.

Overview

Bubble chart is graph type which displays three dimensions of data. It can be considered as variation of scatter chart where data points are replaced with bubbles.

What this type of chart needs?

This graph type needs three series, as the 1st series in the list is applied to the X-axis, the 2nd to the Y-axis and the 3rd series will be used to define the size of the bubbles.

Settings

Size of bubble

To adjust the size of the bubbles, click on one of them. You’ll find the size settings under the presentation properties tab, here. The value is given in pixels. This number will set the size of the biggest bubble (highest value in series), all others will be adjusted proportionally.

Reference value

If this field is empty the 'Size' from field above it (representing bubble width in px) will be assigned to the largest value.

If you type in for example '50' the bubble will have width as stated in 'Size' when the value in series is '50', all others will be adjusted proportionally.

Negative values

By default, bubbles with negative values are not visualized. Simply mark the check box to include them. When negative bubbles are visualized the size of the bubble is defined by the absolute value of the series.

How Graph layout works?

Graph layout window allows to choose one of graph styles which differs depending on chart type. There are three ways to access Graph layout settings:

  • by clicking on Graph layout icon

  • by right clicking on the chart and selecting Graph layout option

  • by using the keyboard shortcut CTRL + L

Here, you can define how the graph should be displayed as well as which series corresponds to which axis.  On the right side of the window, the graphed pairs of series are displayed under a graph type. The first series of each pair is placed on the x-axis and the second one on the y-axis. Click and drag to move them if you want to switch the axes.

Examples

Bubble chart sample

In this example we presented typical use of Bubble chart.

New houses construction

Bubbles can be also used as weights on Time chart.

Open-high-low-close & Candlestick chart

For elements not mentioned here see Elements of the chart.

Overview

Open-high-low-close

This type of graph, called also OHLC is typically used to illustrate movements in the price of a financial instrument over time.

Candlestick

This is simply other type of OHLC graph, where each candlestick represents all four important pieces of information for that day: open and close in the thick body; high and low in the 'candle wick'.

What this type of chart needs?

To create Open-high-low-close or Candlestick graph you need 4 series which will represent movements of price - specifically open, high, low and close. Without it it's not possible to create these graphs.

How Graph layout works?

Graph layout window allows to choose one of graph styles which differs depending on chart type. There are three ways to access Graph layout settings:

  • by clicking on Graph layout icon

  • by right clicking on the chart and selecting Graph layout option

  • by using the keyboard shortcut CTRL + L


Here, you can define how the graph should be displayed as well as which series corresponds to which axis.  On the right side of the window, the graphed pairs of series are displayed under a graph type. The first series of each pair is placed on the x-axis and the second one on the y-axis. Click and drag to move them if you want to switch the axes.

Example

Graph samples

In this example we presented available types of charts.

Stripe, Range & Fill chart

For elements not mentioned here see Elements of the chart.

Overview

These three graph types transform series included in chart respectively into:

Stripe

If there's two series included, stripe will treat it as start and end of range, and it will show area in between. Area displayed in Stripe chart type have uniform manner.

Range

When this graph type is chosen, it will transform all series included in the chart into range. At first glance it looks like Stripe, however in reality it's a set of columns, which is visible when we limit range on x-axis. Columns in range chart starts from the minimum and ends with the maximum value. This way each column highlights the difference between the highest and lowest values.

Fill

Fill type of graph needs specific type of series, otherwise when we choose it from Graph layout - it would make chart unreadable. Typically, it would be a series which represents Business Cycle Reference Dates. This is also another way for adding Fill range to chart, for more about this check Recession bands (Fill range).

What this type of chart needs?

Similarly, as any other graph type, those graph types needs any series added in Series list. However, in case of Stripe and Range, there must be at least two series included, as it need to specify the beginning and end of area. Regarding Fill graph type, ideally series need to be constructed based on simple numbers, like 0 and 1.

How Graph layout works?

Graph layout window allows to choose one of graph styles which differs depending on chart type. There are three ways to access Graph layout settings:

  • by clicking on Graph layout icon

  • by right clicking on the chart and selecting Graph layout option

  • by using the keyboard shortcut CTRL + L


Here, you can define how the graph should be displayed as well as which series corresponds to which axis.  On the right side of the window, the graphed pairs of series are displayed under a graph type. The first series of each pair is placed on the x-axis and the second one on the y-axis. Click and drag to move them if you want to switch the axes.

Example

Graph samples

In this example we presented available types of charts.

Area & Stacked area chart

For elements not mentioned here see Elements of the chart.

Overview

Area

This type of graph is based on the line chart, with the area below the line filled in with a certain color, this also includes negative values. Range is defined by each point of time series.

Stacked area

Similarly, to Area graph type, it shows whole range of series. However, it displays all series stacked on top of each other. Note that this graph type does not include negative values.

What this type of chart needs?

This graph type works the same as Line chart, it needs at least one series added to Series list. On the other hand, Stacked area chart needs more than one series, as with one series it will be presented as normal Area chart.

How Graph layout works?

Graph layout window allows to choose one of graph styles which differs depending on chart type. There are three ways to access Graph layout settings:

  • by clicking on Graph layout icon

  • by right clicking on the chart and selecting Graph layout option

  • by using the keyboard shortcut CTRL + L


Here, you can define how the graph should be displayed as well as which series corresponds to which axis.  On the right side of the window, the graphed pairs of series are displayed under a graph type. The first series of each pair is placed on the x-axis and the second one on the y-axis. Click and drag to move them if you want to switch the axes.

Example

Graph samples

In this example we presented available types of charts.

Line chart

For elements not mentioned here see Elements of the chart.

Overview

Line chart is the default type of graph which is displayed in all Macrobond documents. It shows data points connected with a continuous line.

It is possible to turn on Markers and set Line as none - this way you can create Scatter chart and Category scatter chart.

What this type of chart needs?

As stated previously, Line chart is the default graph type in Macrobond. It's universal and available in all documents. This type only needs series placed in Series list, after that you can add Time chart where line chart will show automatically. When there's more than one series, it is possible to set one or few of them on Alternate scale.

How Graph layout works?

Graph layout window allows to choose one of graph styles which differs depending on chart type. There are three ways to access Graph layout settings:

  • by clicking on Graph layout icon

  • by right clicking on the chart and selecting Graph layout option

  • by using the keyboard shortcut CTRL + L

Here, you can define how the graph should be displayed as well as which series corresponds to which axis.  On the right side of the window, the graphed pairs of series are displayed under a graph type. The first series of each pair is placed on the x-axis and the second one on the y-axis. Click and drag to move them if you want to switch the axes.

Example

Graph samples

In this example we presented available types of charts.

Column & Stacked column chart

For elements not mentioned here see Elements of the chart.

Overview

Column and Stacked column charts display data as vertical bars. Categories are applied depending on analysis used before. In most cases output can be a time series but after analyses such as Scalar or Slice.

Column

It shows each observation as a single column, when there's more than one series on a graph, it will represent it as separate column in different color.

Stacked column

The difference between Column and Stacked column is that the second one will display all series stacked on top of each other. It's worth to remember that stacked column works only when you have more than one series in your chart, otherwise it will look exactly as normal Column graph with only one series included.

What this type of chart needs?

Column and stacked column chart needs data specified as observations or categories. Both are available in the following chart types:

  • Time chart
  • Category chart
  • Bar chart

How Graph layout works?

Graph layout window allows to choose one of graph styles which differs depending on chart type. There are three ways to access Graph layout settings:

  • by clicking on Graph layout icon

  • by right clicking on the chart and selecting Graph layout option

  • by using the keyboard shortcut CTRL + L


Here, you can define how the graph should be displayed as well as which series corresponds to which axis.  On the right side of the window, the graphed pairs of series are displayed under a graph type. The first series of each pair is placed on the x-axis and the second one on the y-axis. Click and drag to move them if you want to switch the axes.

Example

Graph samples

In this example we presented available types of charts.

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 settings color rules you create Heatmap.

Rules panel is available under Chart properties > Chart elements > Rules. In 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 the one with descriptions. It's not possible to do 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 series with values and another which is condition-formula:

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

And you want to show the actual values but color them using the formula series. '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.

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.

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.
See here pre-1.27 version view

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.