Skip to content

Radial Bar Chart

The Radial Bar Chart shows several values side by side as concentric rings. Each ring is a bar bent into an arc and is filled from the top, clockwise, up to its value. Use it to compare a few values on the same scale, such as the fill levels of the tanks on MS Nordkapp. It is found in the Chart - OpenBridge section of the Perspective Component Palette as Radial Bar Chart (Beta).

Note: This component is in beta: its properties may change in a later version.

Radial Bar Chart with three rings and a legend

  1. Rings — one per value in data; the first value is the outer ring. See Data.
  2. Remaining part — the light part of each ring, up to max. See Data.
  3. Legend — the number and value of each ring. See Legend.

A Radial Bar Chart dropped from the palette has no data and draws nothing. The blue frame is the component’s box:

Radial Bar Chart with default properties

The chart is drawn at a fixed size, set by fixedHeight, and does not follow the size of the component’s box.

data is a list of numbers, one per ring, for example [70, 50, 30]:

Radial Bar Chart with the values 70, 50 and 30

The first value is the outer ring. Each ring is filled from the top, clockwise, in proportion to max; the rest of the ring is drawn light. A value of max or more fills the whole ring.

To show live values, set data to a list of the right length and bind each item to a tag, for example data[0] to [default]Tanks/Fuel01/Level.

Hovering over a ring shows its number and value. The rings have no names: they are called Ring 1, Ring 2, … from the outside in, in the tooltip and the legend.

Tooltip over the outer ring

max
100 (default) max 100
200 max 200
Name Description Property Type
data The values, one per ring, outer ring first. Empty by default. array
max The value of a full ring, the same for all rings. Default 100. value

circumference is the length of the arc in degrees. All rings start at the top:

circumference
270 (default) Three-quarter circle
360 Full circle
180 Half circle
Name Description Property Type
circumference Length of the arc in degrees, 360 for a full circle. Default 270. value

All rings have the same thickness. The chart makes the rings as thick as the space allows, but at least minRingThickness px, and makes the hole in the middle smaller as rings are added:

data
[70] One ring
[90, 75, 60, 45, 30, 15] Six rings
[95, 85, 75, 65, 55, 45, 35, 25, 15, 5] Ten rings

With three rings and the default height, the rings are already thicker than 16 px. A larger minRingThickness makes them thicker and the hole smaller:

minRingThickness
16 (default) Minimum thickness 16
32 Minimum thickness 32

When the rings do not fit at their minimum thickness, they are made thinner.

Name Description Property Type
minRingThickness Minimum thickness of a ring in px. Default 16. value

The rings are coloured in shades of the OpenBridge palette, from dark (outer) to light. priority selects the shades:

priority
regular (default) Regular priority, grey
enhanced Enhanced priority, blue

There are five shades; a sixth ring gets the first shade again.

colors replaces the shades with your own colours, one per ring, in the order of data, for example ["#2f6fb5", "#e0a526", "#4c9a5a"]:

Radial Bar Chart with custom colours

Note: A colour in colors must be a plain colour value (#2f6fb5, rgb(47, 111, 181), steelblue). OpenBridge colour variables such as var(--base-blue-500) are not understood. Custom colours also stay the same in every palette, so leave colors empty where the chart must follow the day and night palettes. An entry that is not a colour value is drawn transparent, and a value in data that is not a number counts as 0.

The default shades follow the OpenBridge palette of the session:

Radial Bar Chart in the night palette

Name Description Property Type
priority regular (grey shades) or enhanced (blue shades). Default regular. value
colors Own colours for the rings, in the order of data. Empty by default (the palette). array

legend adds a list of the rings, with their colour, name and value. The names are always Ring 1, Ring 2, … and cannot be changed. The legend is drawn to the right of the chart and makes the chart about 130 px wider than fixedHeight. The blue frame is a box of 460 × 320:

Radial Bar Chart with a legend

Note: Make the component’s box wide enough for the legend. In a box of the default 320 × 320 the legend is drawn outside the box. To name the rings, put Labels beside the chart instead.

Name Description Property Type
legend Show a legend right of the chart. Default false. value

The chart is drawn at a fixed height, fixedHeight, and is that wide too (plus the legend). It stays at the top left of the component’s box and does not follow the size of the box. The default of 320 matches the size of the other OpenBridge round instruments. Give the box the same size as the chart.

fixedHeight
160 Height 160
240 Height 240
320 (default) Height 320

Below a fixedHeight of 192 the gaps between the rings are narrower and there is no tooltip.

showDebugOverlay draws a red frame around the chart and a dashed circle around the chart area, for checking the layout. Leave it off in a project.

Debug overlay

Name Description Property Type
fixedHeight Height (and size) of the chart in px. Default 320. value
showDebugOverlay Draw layout guides over the chart. Default false. value

The Radial Bar Chart has no component events of its own.

  1. Drop a Radial Bar Chart into the view; keep the box at 320 × 320.
  2. Set data to [0, 0, 0].
  3. Bind data[0], data[1] and data[2] to the fill levels in percent, for example [default]Tanks/Fuel01/Level, [default]Tanks/Fuel02/Level and [default]Tanks/FreshWater01/Level.
  4. Put three Labels beside the chart, Fuel 1, Fuel 2 and Fresh water, to name the rings from the outside in.
  1. Drop a Radial Bar Chart and make its box 460 × 320.
  2. Set max to the rated power, for example 2500, circumference to 360 and legend to true.
  3. Set data to [0, 0] and bind data[0] to [default]Engines/ME1/Power and data[1] to [default]Engines/ME2/Power.

Built on the OpenBridge Design System