Upload Historical Data to Graph
Dialog Purpose
The “Upload Historical Data to Graph” dialog allows users to import historical data (CSV or XLSX format) for a specific datapoint. This data can be inserted temporarily into the graph as a trend or saved permanently into the database.
To access this feature, navigate to the graph view and click the Upload data button (the icon with an upward-pointing arrow) located in the top toolbar.
Data Input Modes
A toggle at the top of the dialog switches between two input methods:
- File: Drag and drop a CSV/XLSX file into the drop zone, or pick one via the file picker. After loading, the dialog displays the file name, size, row count, and encoding.
- Paste text: Paste CSV data directly into the provided text field.
Automatic Format Detection
After data is entered, the dialog automatically detects the following parameters without requiring manual configuration:
- Column delimiter
- Decimal separator
- Date format
- Time format
- Encoding
- Number of header rows to skip
Manual Format Adjustment
Users can expand a collapsible panel to override automatic detection. If a manual change is made, a Re-detect link will appear, allowing users to revert to automatic settings. Adjustable parameters include:
- Column delimiter and decimal separator
- Date and time format
- Time mode (combined with date, separate column, or date only)
- Encoding
- Skip header rows
Preview and Statistics
The dialog provides live updates on the data processing status:
- Valid / Errors: Displays the count of successfully parsed and invalid rows.
- Range: Shows the chronological time range of the data (from–to).
- Detected interval: Indicates the spacing between samples in seconds.
- Preview table: Displays parsed rows containing date, value, and status, with errors visibly highlighted.
Note: The date format used in the preview and statistics is `dd.MM.yyyy ddd HH:mm:ss` (e.g., `25.05.2026 Mon 10:00:00`).
Footer Buttons
- Cancel: Closes the dialog without saving. If a trend is currently shown on the graph (resume mode), it requests confirmation before removing the trend.
- Clear: Clears the preview while retaining format settings (visible only after data is loaded). In resume mode, it asks for confirmation to remove the trend from the graph without closing the dialog.
- Show in graph: Inserts parsed data into the graph as a temporary trend. This does not save to the database and requires the data to be valid.
- Save to database: Permanently writes the data to the datapoint's history. It displays a summary confirmation dialog (number of points, time range, interval, and datapoint interval changes) before executing a batched upload with a progress indicator. If an error occurs, the dialog remains open with an error message.
Resume Mode
If a user previously showed data in the graph and reopens the dialog, it will pre-fill with the original content and settings. Users can then edit the data, save it to the database, or cancel the operation (which removes the trend).
Input Format Examples
CSV (Text Format)
CSV format defaults to two columns (timestamp and value) separated by a semicolon `;`. The decimal separator is a comma `,` (Czech locale). Headers are optional.
Important: Rows that cannot be parsed (e.g., missing date, non-numeric value) are marked as invalid in the preview, counted in the Errors statistic, and skipped during saving.
1. Date and time in a single column (default CZ format):
25.05.2026 10:00;42,5 25.05.2026 10:01;42,7 25.05.2026 10:02;42,3
2. With seconds (can be mixed with no-seconds format):
25.05.2026 10:00:15;42,5 25.05.2026 10:01;42,7 25.05.2026 10:02:30;42,3
3. Date and time in two separate columns (“separate column” mode):
25.05.2026;10:00;42,5 25.05.2026;10:01;42,7
4. Date only, no time (“date only” mode): (Every row is assigned the same time set in the panel)
25.05.2026;42,5 26.05.2026;43,1
5. With a header (recognized and skipped automatically):
Time;Value 25.05.2026 10:00;42,5 25.05.2026 10:01;42,7
6. US format (detects MM/DD/YYYY date and dot decimal separator):
05/25/2026 10:00:00;42.5 05/25/2026 10:01:00;42.7
XLSX (Excel Format)
Data is read from the first row of the first sheet by default. Leading title or header rows are automatically skipped once the dialog identifies the first row with a date in column A.
Note: XLSX supports sheet selection if the workbook contains multiple sheets. The number of rows to skip can also be manually configured in the format panel.
1. Basic format (Date in Column A, Value in Column B): (Cells in column A can be typed as an Excel date/time format or as text in `dd.MM.yyyy HH:mm` format)
| A (Date/Time) | B (Value) |
|---|---|
| 25.05.2026 10:00:00 | 20,0 |
| 25.05.2026 10:01:00 | 20,5 |
| 25.05.2026 10:02:00 | 21,0 |
2. Date and time in separate columns:
| A (Date) | B (Time) | C (Value) |
|---|---|---|
| 25.05.2026 | 10:00:00 | 42,5 |
| 25.05.2026 | 10:01:00 | 43,5 |
3. With title/header rows (skipped automatically):
| Column A | Column B |
|---|---|
| Mervis SCADA — Temperature Export | |
| Project: TestProject | |
| (blank row) | |
| Time | Value |
| 25.05.2026 10:00:00 | 20,0 |
| 25.05.2026 10:01:00 | 20,5 |

