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.
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
endDatevalues 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)
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.
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:
| Property | Default | Column it reads |
|---|---|---|
Data Key | (none) | the data source name (states). |
Series id | locationName | distinct values become the chart rows (one per location). |
Event id | name | event/legend identity — equal state names share a legend entry. |
Start Time | startDate | epoch-millis start of each segment. |
End Time | endDate | epoch-millis end of the last segment in each row. |
Event Color | color | hex 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
| Symptom | Cause | Fix |
|---|---|---|
| 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 row | No state records overlap the queried window for that location. | Widen the period, or confirm the location has state history. |
| Legend is empty / not showing | Show 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 state | The 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
| Property | Description |
|---|---|
Show Legend | Toggles 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 Axis | Toggle the category (rows) axis and the time axis. |
Series Spacing | Bar thickness within each row (0.1–1.0). |
Date Format | A SimpleDateFormat pattern for the time-axis labels. |
Event Properties Key | Optional second dataset (id, description, color) that defines the legend. |
Scripting | Optional Jython hook to customize the underlying chart before it renders. |