Bar chart


The Bar chart is a way to display category series, usually created using the scalar analysis. It can be added only after some of the analyses.

It’s a good way to show comparisons between categories or to track changes over time. The left-most column of a bar chart usually lists the series’ category labels, and the other columns display the values either as graphs or text. The graphs you can use are bars, lines, markers, or bubbles.

To build the bar chart below, we used Scalar to calculate the 2014 values of some South Korean population series. We also calculated each series proportion of the total population on the same date. We then displayed this information in a bar chart with 5 columns: 3 text columns and 2 graph columns.


The settings for the bar chart are different from most of the other chart types. When you click on any element of the chart, several tabs appear in the command bar at the top of the window 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. The tab that opens automatically will contain properties for the specific element you selected, and the other tabs available will contain properties for other elements that include the selected element. For example, if you select one cell of text, the “cell properties” tab will open, and other available tabs will be “column properties” and “graph area properties.” Have a look at the tabs available and choose the one that describes what you’d like to edit.

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. In the South Korean population example, we have five different elements in graph layout in the order of the five columns in our bar chart.

There can also be several graphs within one column. In this case, they will be drawn in the order defined in this window. The second graph in a column is drawn on top of the first one.

For each column, you can select whether new series that are added to the document should be automatically added.

By default, a bar chart includes a text column containing the categories’ labels and a graph column with the values displayed as bars.

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 graphs presented with Range and Marker:

Default settings

Most properties have a default setting that is applied to the whole chart. You can override a default setting by selecting and editing specific elements. The new setting will become pinned and will no longer use the default value. This is indicated by the blue “pin” becoming vertical.  You can go back to use the default value by “unpinning” the setting.

Default values can be found in the chart or column properties tab, depending on the setting.

When you edit the default, it will affect elements set to the default value.

Chart size

Unlike time charts and category charts, the height of bar charts is determined by the content of the chart, while width can be set in three different ways. 

 The width of the chart can be set to:  

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

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

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 height is determined by the size of the header, footer and graph area. You can adjust default sizes under column defaults in the chart properties tab. 

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 following example, we used the dynamic text “{s .Value F2}%,” to present the value of the series with one decimal followed by a percentage sign.

Conditional formatting

This feature is available in Macrobond 1.24 and later.

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. Bear in mind that the settings for bar charts should be specified under a 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, you can select “Open in style sheet editor…” on the “Style sheet” menu when the Bar chart is active. This will copy the current settings from the chart to the style sheet. For settings that may have several different configurations within the same chart, like separators between columns and graph area settings, the first relevant column will be used. Graph styles will be copied from the first eight graphs.


South Korea demography Bar chart

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.


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 Chart properties tab: 

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

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 box, and click "Edit column default."
  2. In the Column Properties tab, go to “Cell defaults” box, and click "Edit text."

Both of these options will bring you to the following window, where you can select from a list of formats.