Skip to main content
Version: V3 (Ignition 8.3)

Status Chart

The Status Chart is an Ignition Report component that renders a stacked ribbon (Gantt-style) timeline. Each row is a series (a location), and each colored segment is an event drawn across the time it was active. It is built for OEE state history: one row per machine/location, every state shown in its configured color.

Status Chart showing several locations with colored OEE state segments over time

The component lives in the Report Designer palette under Charts.

How it draws

  • Rows are grouped by the Series id column (the location).
  • Within a row, segments are laid end-to-start: each segment's end is taken from the next segment's start time. Only the last segment in a row uses the End Time column. Intermediate endDate values and any gaps between records are ignored — the ribbon is always contiguous.
  • Each segment is filled with its own Event Color value.

Setting it up

1. Create the data source — it must be a Dataset

This is the step that trips people up. system.mes.oee.getStateRecordsForPeriod(...) returns a list of dictionaries, which is ideal for Perspective but is not something a report component can read. A report component reads rows and columns of a Dataset. If you put the raw list into a report parameter (or a data source that doesn't return a Dataset), the report stores its string form and the chart has no rows to draw — you get a completely blank chart.

So add a Scripting data source (Report Data tab → Data Sources+Scripting), name it e.g. states, and convert the records into a Dataset:

# Scripting data source "states" -> returns a Dataset (NOT a raw list).
# StartDate / EndDate here are the report's date parameters.
records = system.mes.oee.getStateRecordsForPeriod("Enterprise/Site/Area/Line1/%", StartDate, EndDate)

# Records are already clipped to [StartDate, EndDate] with non-null ends, so just shape them into a Dataset.
headers = ["name", "locationName", "startDate", "endDate", "color"]
rows = [[r["name"], r["locationName"], r["startDate"], r["endDate"], r["color"]] for r in records]

return system.dataset.toDataSet(headers, rows)
Use a wildcard path for multiple rows

getStateRecordsForPeriod takes a location path with */% wildcards, so a line path like Enterprise/Site/Area/Line1/% returns every child machine and the chart draws one row per machine. "%" alone matches every location.

Dates are epoch-millis

startDate/endDate come back as epoch-millis numbers. Keep them as numbers (don't convert to Date) — the chart expects millis on its time axis.

2. Drop the chart and point it at the data source

Drag a Status Chart onto the report and set Data Key to the data source name (states). The remaining key properties default to the exact column names produced above, so no remapping is needed:

PropertyDefaultColumn it reads
Data Key(none)the data source name (states).
Series idlocationNamedistinct values become the chart rows (one per location).
Event idnameevent/legend identity — equal state names share a legend entry.
Start TimestartDateepoch-millis start of each segment.
End TimeendDateepoch-millis end of the last segment in each row.
Event Colorcolorhex color used to fill each segment.

3. The time axis comes from the data

The chart derives its time-axis range automatically from the records it's given — there are no Start/End Date properties to set. Because getStateRecordsForPeriod clips records to the requested window, the axis matches the StartDate/EndDate you query (a state that began weeks earlier is shown starting at StartDate, not from its true start). To change the visible window, change the range you pass the data source.

Troubleshooting

SymptomCauseFix
Chart is completely blank (no rows, no axes)The Data Key points at a string/parameter or a non-Dataset source — the chart has no rows/columns.Make the data source a Scripting data source that returns system.dataset.toDataSet(...) (step 1). Don't store the list in a parameter.
A location has no rowNo state records overlap the queried window for that location.Widen the period, or confirm the location has state history.
Legend is empty / not showingShow Legend is off.The legend auto-populates from the distinct state names in the data — just enable Show Legend (on by default).
Legend color looks off for a stateThe same state name has different colors across locations.Bars are always colored from each record's own color; the auto-legend shows one entry per name using the first color seen for it. Supply an Event Properties dataset to define labels/colors explicitly.

Property reference

PropertyDescription
Show LegendToggles the state legend. When on it auto-populates one entry per distinct state name (unless an Event Properties dataset is supplied).
Show Domain Axis / Show Range AxisToggle the category (rows) axis and the time axis.
Series SpacingBar thickness within each row (0.1–1.0).
Date FormatA SimpleDateFormat pattern for the time-axis labels.
Event Properties KeyOptional second dataset (id, description, color) that defines the legend.
ScriptingOptional Jython hook to customize the underlying chart before it renders.