com.ergotech.vib.graphics.javascript.charting.BarChart
The BarChart graphic is a chart graphic used to display data as vertical bars.
BarChart is commonly used to compare values across categories, indexes, timestamps, or multiple data series.
The current BarChart uses chart configuration properties such as Series, YAxis, Use2DInput, and optional reference line settings.
BarChart can receive input through valueInput or through individual bar input ports, depending on the Use2DInput setting.
When Use2DInput is checked, BarChart uses valueInput for array-style or two-dimensional chart data.
When Use2DInput is unchecked, BarChart uses individual bar input ports such as `bar_0`, `bar_1`, and additional ports based on the configured series.
The input can come from a data source, Constant, BroadcastServer, or another logic component.
For full chart behavior, BarChart works best with table-style or array-style data sources.
Common test data sources include:
TwoDimensionalDataSource is useful for testing x/y values, timestamps, and multiple data columns.
ArrayDataSource is useful for simpler bar chart testing.
BarChart is used as a display graphic.
BarChart does not provide a default user-input output workflow.
BarChart displays data using one or more configured bar series.
BarChart-specific settings include:
The visible Logic Editor ports depend on the Use2DInput setting.
When Use2DInput is checked, BarChart uses this port:
Use valueInput with TwoDimensionalDataSource or ArrayDataSource when the chart should receive array-style or two-dimensional chart data through one connection.
When Use2DInput is unchecked, BarChart uses individual bar input ports such as:
The available bar input ports depend on the chart configuration and the configured series.
Use individual bar input ports when each bar series should be updated from a separate scalar data source.
BarChart uses the Series property to define the bar series displayed on the chart.
A series controls how one group of bars appears on the chart.
The Series editor includes a live preview and grouped settings for appearance, layout, axis selection, and animation.
When a data source provides multiple data columns, matching series should be configured so each column can display as a separate bar series.
For example, if a TwoDimensionalDataSource provides multiple Y columns, the BarChart should have matching bar series configured for those values.
To add another bar series:
BarChart Series editor with preview, appearance, layout, axis, and animation settings.
The Series editor includes these sections:
The Appearance section includes:
The Layout section includes:
The Axis section includes:
The Animation section includes:
When using multiple data columns, each visible bar group needs a matching configured series.
For example:
One Y column = one bar series Two Y columns = two bar series Three Y columns = three bar series
If the chart only has one configured series, extra data columns can fail to appear as separate bar groups.
TwoDimensionalDataSource is the main test data source for BarChart.
With timestamp behavior enabled on the data source, the chart can display time-based bar data.
With timestamp behavior disabled, the first data column can be used as the x-axis, and additional columns can be used as y-series data.
Multiple y-series require matching entries in the Series configuration.
Use TwoDimensionalDataSource with Use2DInput checked and connected to valueInput.
ArrayDataSource can be used for simpler BarChart testing.
Array data is useful when a simple set of bar values needs to be displayed.
Use ArrayDataSource with Use2DInput checked and connected to valueInput.
For full x/y behavior, timestamp behavior, or multiple data columns, use TwoDimensionalDataSource.
When Use2DInput is unchecked, BarChart uses individual bar input ports such as `bar_0`, `bar_1`, and additional ports based on the configured series.
These ports allow scalar data sources to update individual bar series.
For example:
SineServer -> bar_0 RandomBoolean -> bar_1 Constant -> bar_2
This mode is useful when each bar should be updated from a separate source.
BarChart includes optional reference line properties:
These properties are used for chart reference lines such as center, lower control limit, and upper control limit lines.
Reference line settings are chart configuration values and should be edited through the chart property controls.
Use BarChart when values should be compared as bars.
Use TwoDimensionalDataSource for full chart testing with x/y values, timestamps, and multiple columns.
Use ArrayDataSource for simpler bar chart testing.
Use Use2DInput checked with valueInput for array-style or two-dimensional chart data.
Use Use2DInput unchecked with individual bar inputs when each bar series should receive a separate scalar value.
Use numeric or array-style data sources with BarChart. String data sources are not appropriate for numeric chart input.
LineChart is better for trend-style line displays. PieChart and DoughnutChart are better for slice-style displays.