viewer: overlay one plot line per processing run (with editable names)
The dataset-info plot now overlays every run as a separate named line instead of replacing the plot when a snapshot is activated: - Reader gains AllSnapshotDatasets() (every snapshot's dataset, Original first). - The worker owns the run collection: a stable snapshot id plus an editable display label (RunData), emitted as runsChanged(runs, active_id) on file open, snapshot register, activate and rename. RenameRun(id, label) updates the legend label without touching the reader key (decoupled id vs label). - The chart view draws the active run as the primary series (markers, hover, binning, axes) and the other runs as overlay lines sharing its axes, with a legend shown when overlaying (appendSeries factored out for both). - The dataset-info widget holds the run list + the live run, extracts the selected metric from each (ExtractMetric), and unions the available metrics across runs. - The live run is its own "Live" overlay (lightweight per-tick refresh, no combo rebuild); it is cleared on finish so the persisted snapshot takes over. - The processing jobs table gets a "Started" column and an editable Name column; editing a name renames that run's legend label. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -178,3 +178,17 @@ std::string JFJochHDF5Reader::ActiveSnapshot() const {
|
||||
std::unique_lock ul(hdf5_mutex);
|
||||
return active_snapshot_;
|
||||
}
|
||||
|
||||
std::vector<std::pair<std::string, std::shared_ptr<const JFJochReaderDataset>>>
|
||||
JFJochHDF5Reader::AllSnapshotDatasets() const {
|
||||
std::unique_lock ul(hdf5_mutex);
|
||||
std::vector<std::pair<std::string, std::shared_ptr<const JFJochReaderDataset>>> out;
|
||||
out.reserve(snapshots_.size());
|
||||
// "Original" first, then the rest, so overlay colours stay stable across updates.
|
||||
if (auto it = snapshots_.find("Original"); it != snapshots_.end())
|
||||
out.emplace_back(it->first, it->second->Dataset());
|
||||
for (const auto &[name, source]: snapshots_)
|
||||
if (name != "Original")
|
||||
out.emplace_back(name, source->Dataset());
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -63,4 +63,7 @@ public:
|
||||
void SetActiveSnapshot(const std::string &name);
|
||||
std::vector<std::string> SnapshotNames() const;
|
||||
std::string ActiveSnapshot() const;
|
||||
|
||||
// All snapshot datasets (name -> dataset), for overlaying every run's plots at once.
|
||||
std::vector<std::pair<std::string, std::shared_ptr<const JFJochReaderDataset>>> AllSnapshotDatasets() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user