feat(graph): add graph tab for whole-run data

Provides a static line chart plotting multi-sensor temperature values
over time when a session file is loaded.
This commit is contained in:
jack
2026-07-10 20:06:48 -07:00
parent 94f917b116
commit 4bb855a940
8 changed files with 242 additions and 2 deletions
+50
View File
@@ -0,0 +1,50 @@
import QtQuick
import QtQuick.Layouts
import ISC
import ISC.Wafer
// ===== Graph Tab =====
// Whole-run multi-sensor line chart (C# parity: tabGraph/chartData). Static
// snapshot recomputed whenever a file is loaded — not live-updating during
// a stream. See specs/plans/2026-07-10-graph-tab.md and
// docs/adr/0003-pyqtgraph-for-multi-sensor-charts.md.
Item {
id: root
anchors.fill: parent
function refresh() {
if (!streamController.loadedFile) {
chart.seriesData = []
chart.sensorNames = []
return
}
chart.sensorNames = streamController.graphSensorNames
? streamController.graphSensorNames.split(",") : []
chart.seriesData = JSON.parse(streamController.graphSeriesJson || "[]")
}
Connections {
target: streamController
function onLoadedFileChanged() { root.refresh() }
}
Component.onCompleted: root.refresh()
Rectangle {
anchors.fill: parent
anchors.margins: Theme.panelPadding
color: Theme.cardBackground
border.color: Theme.cardBorder
border.width: 1
radius: Theme.radiusMd
GraphQuickItem {
id: chart
anchors.fill: parent
anchors.margins: 8
title: "Sensor Temperature Over Time"
xLabel: "Measurement Interval"
yLabel: "Temperature (°C)"
}
}
}