The Monitoring Dashboard is the primary data visualisation surface in PrintHeritage. It renders interactive time-series charts powered by ApexCharts for every dataset attached to a project. The dashboard supports multiple chart types, date-range filtering, dataset-by-dataset carousel navigation, fullscreen mode, and variable chart height — all without leaving the project detail page.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/joaomonteir0/printheritage/llms.txt
Use this file to discover all available pages before exploring further.
Dataset Carousel
When a project has more than one dataset, a pagination control appears in the toolbar:- Previous (‹) and Next (›) arrow buttons cycle through datasets one at a time.
- A counter badge shows the current position (e.g. 2 / 5) so you always know how many datasets are loaded.
- Navigating to a different dataset automatically clears any active date filters.
label is displayed in the header alongside a Sensor Data badge.
The carousel counter and navigation arrows are only rendered when the project has two or more datasets. For single-dataset projects the controls are hidden.
Chart Types
Each dataset carries ametadata.defaultChartType value set during ingestion. When a dataset is loaded, the monitoring dashboard maps the Portuguese chart type name to its ApexCharts type identifier:
| Metadata value | ApexCharts type |
|---|---|
Linha | line |
Área | area |
Barras | bar |
Scatter | scatter |
supportedChartTypes, a toolbar button group renders an icon button for each supported type. Clicking a button switches the chart type in real time. If no supportedChartTypes is set, the toolbar defaults to showing Area and Line buttons.
Date Range Filtering
A date range control sits below the main toolbar:- Start date input — filters out all readings with a date before the selected value.
- End date input — filters out all readings with a date after the selected value.
- Both inputs use
YYYY-MM-DDcomparison against the first 10 characters of each reading’sdatefield. - The Clear Filters button (with a
FilterXicon) appears only when at least one filter is active and resets both inputs to empty.
useMemo, so it is instantaneous and requires no additional API calls.
A live reading counter next to the filter bar shows the number of data points currently visible after filtering, labelled Leituras.
Multi-Series Charts
Datasets that contain multiple sensor columns — defined bymetadata.selectedColumns — render each column as a separate series on the same chart. If selectedColumns is not present in the metadata, the dashboard falls back to all keys in the first data row except date.
Each series is automatically coloured using a four-colour palette (#3b82f6, #10b981, #f59e0b, #ef4444) and labelled by its column name in the chart legend.
The x-axis uses Unix timestamps derived from new Date(d.date).getTime() and is formatted as dd MMM yyyy HH:mm in tooltips. The y-axis label shows the sensor type in uppercase along with the unit in parentheses (e.g. TEMPERATURA (°C)). The unit defaults to ºC if metadata.unit is absent.
Chart Configuration Options
Fullscreen Mode
The fullscreen toggle button (
Maximize2 / Minimize2 icon) switches the entire dashboard component from its inline card layout to a fixed overlay covering the full viewport. The chart height in fullscreen mode is locked to 70vh.Chart Height
The height adjustment button (
ArrowsUpFromLine icon) cycles the chart height through three values: 500 px → 800 px → 350 px → 500 px, letting you trade vertical space for more data visibility.Toolbar
The underlying ApexCharts toolbar exposes download, selection, zoom in/out, pan, and reset controls. These allow precise exploration of any time window within the visible data.
Smooth Stroke
All line and area series use a smooth bezier curve (
stroke.curve: 'smooth', width 3). Area fills use a gradient that fades from 45 % opacity at the series line to 5 % at the bottom.Dark Mode Support
The chart theme (ApexOptions.theme.mode) is set dynamically by inspecting document.documentElement.classList.contains('dark') at render time. Axis label colours, grid line opacity, and tooltip theme all adapt accordingly. Background is always transparent, inheriting the card background from the parent component.
Dataset Deletion
WhencanDelete is true — granted to users with the SUPER_ADMIN or GENERAL_ADMIN global role, or PROJECT_ADMIN project role — a red trash-bin button appears in the toolbar.
Clicking it triggers a confirmation modal. If confirmed, the project detail page calls: