Configuring Bubbles as Points

Most of the functionality in QlikMaps is accessible through simple selections from drop-down menus. See Points - Marker Type - Bubble for more information.

If an older versions of QlikMaps is used or there is a need for more granular control over the map, more advanced techniques can be used.

Below are a number of examples of advanced expressions that can be used to customize 'Bubble' maps.

Bubble Fill Color

By default, QlikMaps assigns a light blue color to bubbles. That color can be changed using an expression.

To configure different colors for bubbles, select <Use Expression> from the <Select a Value> drop down under color.

  • If value is selected, the returned expression will be evaluated by QlikMaps and colored based on the selected palette.
  • If color is selected, the returned expression will be evaluated as an RGB() color or HEX#.

The following examples assume you have selected color.

Single Color Bubbles

  • Open the Bubble Fill Color expression box by clicking on the Fx.
  • Type an RGB code or native Sense color code in the Expression Editor.
  • Enclose the color value in single quotes.
'RGB(255,0,0)'

or

'red()'

Multi Color Bubbles

  • Open the bubble fill color expression box by clicking on the Fx.
  • Type an an expression that returns an RGB() code or native Sense color code for each marker type in the expression editor.
  • Enclose the expression in single quotes.
'if(Sum([x]) > sum(TOTAL [x])/Count(DISTINCT Total [Dimension]), Green(),LightRed())'

Or

'if([Dimension]=''A'',Green(),LightRed())'

Note that in the example above two single quotes are used around the value A. This is because two single quotes are necessary when returning a text value. For more information, see Qlik Sense Editor

Bubble Outline Color

By default, bubble border colors are white.

To configure different colors for bubble borders, select <Use Expression> from the <Select a Value> drop down under border color.

Single Outline Color Bubbles

  • Open the bubbles outline color expression box by clicking on the Fx.
  • Type an RGB code or native Sense color code in the expression editor.
  • Enclose the color value in single quotes.
'RGB(255,0,0)'

or

'red()'

Multi Outline Color Bubbles

  • Open the bubbles outline color expression box by clicking on the Fx.
  • Type an an expression that returns an RGB() code or native Sense color code for each marker type in the expression editor.
  • Enclose the expression in single quotes.
'if(Sum([x]) > sum(TOTAL [x])/Count(DISTINCT Total [Dimension]), Green(),LightRed())'

Or

'if([Dimension]=''A'',Green(),LightRed())'

Note that in the example below two single quotes are used around the value A. This is because two single quotes are necessary when returning a Text value. For more information, see Qlik Sense Editor

Bubble Opacity

By default, bubble opacity is set to 85%. This can be changed using an expression for marker opacity.

To configure different opacity levels for bubbles, click on the color caption and select the gear icons.

Single Opacity Level Bubbles

  • Open the opacity expression box by clicking on the Fx.
  • Type a number between 0 and 100 in the expression editor that corresponds to the desired opacity percentage.
  • Enclose the color value in single quotes.
'50'

Multi Opacity Level Bubbles

  • Open the opacity expression box by clicking on the Fx.
  • Type an an expression that returns a number between 0 and 100 that corresponds to the desired opacity percentage for each marker type in the expression editor.
  • Enclose the expression in single quotes.
'if(Sum([x]) > sum(TOTAL [x])/Count(DISTINCT Total [Dimension]), 100,50)'

Or

'if([Dimension]=''A'',100,50)'

Note that in the example below two single quotes are used around the value A. This is because two single quotes are necessary when returning a text value. For more information, see Qlik Sense Editor

Bubble Size

By default, bubble size is set to 20 pixels. That size can be changed using an expression.

To configure a different marker size select <Use Expression>.

  • If value is selected, the expression will take the return of any Sense expression and scale the points accordingly.
  • If pixels is selected, the expression must return the pixel size for each point. The examples below provide examples.

Single Bubble Size for all Bubbles

  • Open the size expression box by clicking on the Fx.
  • Type a number in the expression editor that corresponds to the desired pixel size for markers.
  • Enclose the color value in single quotes.
'50'

Multi Bubble Size for all Bubbles

  • Open the  size expression box by clicking on the Fx.
  • Type an an expression that returns a number that corresponds to the desired pixel size for each marker type in the expression editor.
  • Enclose the expression in single quotes.

Often, normal expression such as Sum( Sales ) returns a large number that is not suitable as a pixel size. We recommend in most scenarios to use a scaling function such as the one below. The scaling function compares the value of a each point compared to the value of all other points and sets a pixel size for all markers between 5 and 30.

'( sum([x]) / (max(TOTAL aggr(sum([x]),[Dimension]))) * 25 ) + 5'

Or

Min - Max scaling expression

'( ( Sum([x]) - Min(TOTAL Aggr(Sum([x]), [Dimension])) ) / ( Max(TOTAL Aggr(Sum([x]), [Dimension])) - Min(TOTAL Aggr(Sum([x]), [Dimension]))) * 25 ) + 5'