Analytics
The Analytics page provides user-created charts for analyzing OEE data over time. Users create, configure, and arrange charts on a dashboard grid. Each chart is persisted to the database per site.
Chart Types
Line Charts (Time-Series)
Line charts plot a metric over time, grouped by time interval. Each selected machine appears as a separate line. The X-axis is time; the Y-axis is the chosen metric.
Available metrics:
| Metric | Description |
|---|---|
oee | Overall Equipment Effectiveness (0-100%) |
availability | Uptime percentage |
performance | Production rate vs. target rate |
quality | Good parts vs. total parts |
downtime | Total downtime in minutes |
mtbf | Mean Time Between Failures in hours |
mttr | Mean Time To Repair in minutes |
scrap_rate | Scrap as percentage of total parts |
batch_count | Number of completed batches |
batch_duration | Total batch run time in minutes |
avg_batch_duration | Average batch run time in minutes |
incident_count | Number of incidents |
incident_duration | Total incident duration in minutes |
Pareto Charts
Pareto charts show categorical breakdowns with bars sorted by value (descending) and a cumulative percentage line overlay. They answer “where is the biggest impact?”
Category groupings:
| Category | Groups by |
|---|---|
downtime_reason | Individual downtime reason codes |
downtime_type | Downtime type (planned, unplanned, idle) |
equipment | Per machine |
shift | Per shift |
batch | Per individual batch |
incident_reason | Individual incident reason codes |
incident_category | Incident reason groups |
Value metrics for Pareto bars:
| Value | Measures |
|---|---|
duration | Total duration in minutes |
count | Number of occurrences |
frequency | Occurrences per day |
batch_count | Number of completed batches |
batch_duration | Total batch run time in minutes |
Data source is either downtime or incident events.
Calculation Modes
Charts that use availability-based metrics support three calculation modes:
| Mode | Formula | Description |
|---|---|---|
standard | Run Time / (Run Time + Unplanned Downtime) | Excludes idle and planned downtime from denominator |
strict | Run Time / (Run Time + Unplanned + Planned Downtime) | Only excludes idle time |
teep | Run Time / Total Calendar Time | Most stringent — all time counts against availability |
Time Configuration
Intervals
Data points are grouped by interval:
| Interval | Label |
|---|---|
1h | 1 Hour |
1d | 1 Day |
1w | 1 Week |
1m | 1 Month |
Each data point represents the metric value for that interval. For example, with 1d interval and oee metric, each point is the OEE for that day.
Date Ranges
Quick presets: 24 Hours, 7 Days, 30 Days, 3 Months, 1 Year, Max. A custom date range is also available.
Chart Configuration
Each chart stores a full configuration:
- Title — user-defined chart name
- Chart type —
lineorpareto - Metric — which Y-axis metric to display
- Calculation mode —
standard,strict, orteep - Equipment selection — which machines to include (stored as JSON array of UUIDs)
- Downtime filters — which downtime types and specific reason codes to include
- Incident filters — which incident reason codes to include
- Time interval and date range
- Display options — legend visibility, Y-axis min/max overrides, duration unit (minutes/hours/days)
- Layout — display order and column span (1-4 columns)
Charts are saved to oee_analytics_charts and load automatically when the user visits the analytics page.
Dashboard Grid
Charts render in a responsive grid layout. Users can:
- Create new charts via a configuration modal
- Edit chart settings (metric, equipment, time range, etc.)
- Reorganize chart positions and column spans via a drag-handle mode
- Delete charts with a confirmation modal
Per-Interval Data Points
Each data point in a line chart represents the metric calculated for that specific interval, not a running cumulative total. For example, if the interval is 1d and the metric is oee:
- March 1: OEE = 82% (for that day only)
- March 2: OEE = 87% (for that day only)
- March 3: OEE = 79% (for that day only)
This makes trends immediately visible — you see how each day (or hour, week, month) performed independently.
Database Table: oee_analytics_charts
| Column | Type | Description |
|---|---|---|
id | UUID (PK) | Auto-generated |
site_id | UUID (FK) | Which Site |
title | VARCHAR(255) | Chart title |
chart_type | VARCHAR(20) | 'line' or 'pareto' |
metric | VARCHAR(50) | Y-axis metric |
calculation_mode | VARCHAR(20) | 'standard', 'strict', or 'teep' |
time_interval | VARCHAR(10) | '1h', '1d', '1w', '1m' |
date_range | VARCHAR(30) | Quick preset or 'custom' |
equipment_ids | JSONB | Array of machine UUIDs |
downtime_types | JSONB | Array of downtime type filters |
downtime_reason_ids | JSONB | Array of specific reason UUIDs |
incident_reason_ids | JSONB | Array of incident reason UUIDs |
pareto_data_source | VARCHAR(20) | 'downtime' or 'incident' |
pareto_category_metric | VARCHAR(30) | Category grouping for Pareto |
pareto_value_metric | VARCHAR(20) | Value metric for Pareto |
duration_unit | VARCHAR(10) | 'minutes', 'hours', or 'days' |
show_legend | BOOLEAN | Whether to show chart legend |
y_axis_min / y_axis_max | NUMERIC | Custom Y-axis bounds (NULL = auto) |
display_order | INTEGER | Position in dashboard grid |
column_span | INTEGER | Grid columns to span (1-4) |
Codebase Paths
- Chart table:
database/sql_scripts/tables/oee_analytics_charts.sql - Frontend component:
frontend/src/app/features/oee-dashboard/components/analytics-tab/ - Chart config model:
frontend/src/app/features/oee-dashboard/models/chart-config.model.ts
See Also
- Station Analytics — charts scoped to stations
- Machine Analytics — charts scoped to individual machines
- Efficiency Calculation
- Events
- Reason Taxonomy