Visualization

BarChart Block

Visualizes data as bars

Open BarChart in BlockWerk →

# BarChart Block

Description

The BarChart block renders an array of scalar values as a vertical bar chart, updating in real time during simulation. Each element of the input array is displayed as a separate bar, allowing instant visual comparison of multiple signal values side by side.

Typical uses include monitoring the magnitude of a multi-channel signal at a snapshot in time, comparing actuator commands across multiple axes, or displaying the frequency components of a discretised spectrum vector.

Parameters

labels

Comma-separated category labels assigned to each bar (e.g. A,B,C,D). The number of labels should match the length of the input array; surplus labels are ignored and missing labels fall back to their index.

colors

Comma-separated CSS colour values (hex or named) applied to each bar in order (e.g. #ff6384,#36a2eb,#cc65fe,#ffce56). Surplus colours are cycled; missing colours reuse the last defined value.

Examples

Comparing four motor currents

Mux(4) → BarChart

Connect four scalar current signals into a Mux block set to 4 channels, then feed its array output to the BarChart. Set labels to M1,M2,M3,M4.

Visualising FFT magnitude bins

FFT → BarChart

Drive the BarChart directly from the array output of an FFT block to display the amplitude spectrum.

Remarks

See Also