Skip to main content

Line Plot Widget Roadmap

LinePlotWidget Development Roadmap

This document tracks remaining development tasks for the Line Plot Widget. For documentation of completed features and current architecture, see the main developer documentation.

Completed Work Summary

The following features are complete and documented in index.qmd:

  • Widget skeleton: EditorState pattern, registration, state/view/properties factories
  • State management: LinePlotState with PlotAlignmentState, RelativeTimeAxisState, VerticalAxisState composition; separate LinePlotStateData.hpp for fuzz-testable serializable struct
  • Rendering pipeline: GatherResult<AnalogTimeSeries> integration, LineBatchData construction, BatchLineRenderer GPU rendering, auto-fit Y/X bounds
  • Per-series options: Line style (color, thickness, alpha) via LineStyleData/LineStyleState/LineStyleControls — same infrastructure as OnionSkinViewWidget and TemporalProjectionViewWidget
  • Axis system: RelativeTimeAxisWidget (X) and VerticalAxisWidget (Y) with bidirectional sync
  • Interaction: Separated X/Y zoom, pan, double-click time navigation via shared PlotInteractionHelpers
  • Line selection: Ctrl+Click drag intersection stroke (add/remove modes), GPU compute shader and CPU intersector backends, shared LineSelectionHelpers with TemporalProjectionViewWidget
  • Properties panel: Alignment controls (PlotAlignmentWidget), series management (add/remove/table), line options (thickness, color), axis range controls in collapsible sections, selection instructions, color-by-group checkbox
  • State serialization: Full round-trip JSON via rfl::json
  • DataManager observer: Combo box population and cleanup in destructor
  • Group integration: GroupManager passed at construction, right-click context menu via shared GroupContextMenuHandler, trial→EntityID mapping via cached alignment times, per-line group color overrides in BatchLineRenderer shader, generation-counter-based reactive updates, color_by_group state toggle

Not yet implemented: Mean/confidence interval overlay, external feature coloring, distribution tooltips, SVG export, and cross-widget linking described below.


Phase 2: Mean / Summary Overlay with Confidence Intervals

Status: Not started. Depends on the existing GatherResult and batch rendering pipeline.

Goal: Optionally display a summary line (mean, median) of the overlaid trial lines, with optional confidence intervals, similar to the summary statistics shown in a PSTH.

2.1 Summary Mode Enum

enum class LinePlotSummaryMode {
    None,       ///< No summary overlay (default)
    Mean,       ///< Arithmetic mean across trials
    Median      ///< Median across trials
};

2.2 Confidence Interval Options

enum class ConfidenceIntervalType {
    None,           ///< No confidence band
    SEM,            ///< Standard error of the mean
    StdDev,         ///< Standard deviation
    CI95,           ///< 95% confidence interval
    Percentile      ///< User-defined percentile band (e.g., 25th–75th)
};

struct LinePlotSummaryConfig {
    LinePlotSummaryMode mode = LinePlotSummaryMode::None;
    ConfidenceIntervalType ci_type = ConfidenceIntervalType::None;
    double ci_alpha = 0.2;                  ///< Opacity of confidence band fill
    std::string summary_color = "#FF0000";  ///< Color of the summary line
    double summary_thickness = 2.5;         ///< Thickness of the summary line

    // For Percentile mode
    double lower_percentile = 25.0;
    double upper_percentile = 75.0;
};

2.3 State Extension

struct LinePlotStateData {
    // ... existing fields ...
    LinePlotSummaryConfig summary;
};

2.4 Implementation

After building LineBatchData from trial data, compute the summary:

  1. Resample all trial lines to a common time grid (the GatherResult may have different sample counts per trial due to varying TimeFrame resolutions)
  2. Pointwise aggregation: For each time sample, compute the summary statistic (mean or median) across all trials
  3. Confidence interval: Compute upper/lower bounds at each sample point
  4. Render summary line as a thicker line on top of the trial lines via SceneRenderer or as an additional entry in the LineBatchData
  5. Render confidence band as a filled semi-transparent polygon (similar to the confidence band rendering proposed in the PSTH Roadmap Phase 3)

2.5 Shared Confidence Band Rendering

The PSTHWidget Roadmap Phase 3 proposes confidence band rendering for histograms. The pointwise confidence band infrastructure (upper/lower bounds per sample → filled polygon) is reusable here. A shared ConfidenceBandMapper in CorePlotting/Mappers/ would serve both widgets:

namespace CorePlotting {
    struct ConfidenceBandData {
        std::vector<double> x_values;    ///< Shared X positions
        std::vector<double> upper;       ///< Upper bound per sample
        std::vector<double> lower;       ///< Lower bound per sample
    };

    /// Build a filled polygon renderable from confidence band data
    RenderableTriangleStripBatch buildConfidenceBand(
        ConfidenceBandData const & band,
        glm::vec4 fill_color);
}

2.6 Properties Panel

Add to LinePlotPropertiesWidget in a “Summary” collapsible section:

  • Summary mode combo (None, Mean, Median)
  • Confidence interval type combo (None, SEM, StdDev, CI95, Percentile)
  • Summary line color picker
  • Summary line thickness spinbox
  • CI opacity slider
  • Percentile range spinboxes (visible only for Percentile mode)

Phase 3: External Feature Coloring

Status: Not started. Design influenced by EventPlot Roadmap Phase 5.

Goal: Allow trial lines to be colored by an external feature stored in a TensorData column, enabling visual grouping by categorical or continuous features.

Concept

The same TensorData infrastructure used for EventPlotWidget external feature sorting/coloring applies here. A TensorData with interval-based rows can provide per-trial feature values:

  • Binary features (0.0/1.0 from threshold transforms) → two-color categorical coloring
  • Continuous features (e.g., firing rate, latency) → colormap-based gradient coloring
  • Alpha scaling — instead of (or in addition to) color, the feature value scales line opacity

3.1 Color Configuration

struct LineColorConfig {
    std::string color_mode = "fixed";    // "fixed", "by_feature", or "by_group"

    // For fixed coloring (existing behavior) — uses LinePlotOptions::hex_color

    // For feature-based coloring
    ExternalFeatureConfig feature;       // Which TensorData column
    std::string colormap = "viridis";    // Colormap name
    double color_min = 0.0;
    double color_max = 1.0;
    bool use_auto_range = true;

    // Alpha scaling (independent of color mode)
    bool alpha_by_feature = false;
    ExternalFeatureConfig alpha_feature;
    double alpha_min = 0.1;
    double alpha_max = 1.0;
};

The ExternalFeatureConfig struct is shared with EventPlotWidget:

struct ExternalFeatureConfig {
    std::string tensor_key;       // DataManager key for TensorData
    std::string column_name;      // Column within the TensorData
    bool ascending = true;        // Sort direction (for sorting use)
};

3.2 Colormap Infrastructure

This feature depends on the colormap infrastructure proposed in the HeatmapWidget Roadmap Phase 2:

namespace CorePlotting::Colormaps {
    using ColormapFunction = std::function<glm::vec4(float t)>;
    ColormapFunction getColormap(ColormapPreset preset);
    glm::vec4 mapValue(ColormapFunction const & cmap, float value, float vmin, float vmax);
}

The colormap system in CorePlotting/Colormaps/ is shared across:

Widget Usage
LinePlotWidget Per-trial line color from feature value
EventPlotWidget Per-trial event color (EventPlot Roadmap Phase 5)
HeatmapWidget Heatmap cell color (Heatmap Roadmap Phase 2)
SpectrogramWidget Spectrogram cell color

3.3 Per-Line Color in BatchLineRenderer

The current BatchLineRenderer uses global colors for normal/selected/hover states. To support per-line coloring, the renderer needs to be extended:

/// Per-line color override (optional — falls back to global if empty)
std::vector<glm::vec4> per_line_colors;

When per_line_colors is non-empty, each line uses its own color instead of the global normal color. Selected and hover states could blend with the per-line color.

This renderer extension also benefits TemporalProjectionViewWidget for entity-based coloring.

3.4 Properties Panel

Add to LinePlotPropertiesWidget in a “Trial Coloring” collapsible section:

  1. Color mode combo — Fixed / By Feature / By Group
  2. TensorData combo box — lists TensorData keys from DataManager
  3. Column combo box — shows columns of the selected TensorData
  4. Colormap combo — colormap preset selection
  5. Range controls — auto/manual min/max spinboxes
  6. Alpha scaling checkbox — enables alpha-by-feature mode
  7. Alpha feature controls — separate TensorData/column for alpha (if different from color)

Phase 4: Distribution Tooltips

Status: Not started. New shared infrastructure needed.

Goal: When the user hovers over the plot, display a tooltip containing a vertical histogram showing the distribution of Y values across trials at that time point. This helps assess the reliability of an “average” (or summary) value by showing trial-to-trial variability.

4.1 Distribution Computation

At a given relative time \(t\):

  1. For each trial, interpolate or look up the signal value at time \(t\)
  2. Collect the \(N\) values (one per trial) into a distribution
  3. Compute a histogram of these values with configurable bin count

4.2 Tooltip Image Generation

Generate a small image (e.g., 150×200 pixels) showing:

  • A vertical histogram (bins on Y-axis matching the plot’s value axis, count/frequency on X-axis)
  • Optional summary statistics overlay (mean, median, std dev)
  • Current time position label

The image should be rendered off-screen (using QImage / QPainter) and displayed in a Qt tooltip.

4.3 Integration with PlotTooltipManager

The tooltip lifecycle (dwell timer, suppression during pan/zoom, show/hide) is handled by the shared PlotTooltipManager (Plots/Common/TooltipManager/). The LinePlotWidget provides two callbacks:

  1. Hit test provider: Converts the screen position to a world X coordinate (relative time). Always succeeds when the cursor is within the plot area, since distributions can be computed at any time point.
  2. Content provider: Receives the hit, computes the cross-trial distribution at that time, renders a vertical histogram into a QPixmap via QPainter, and returns it as PlotTooltipContent. The PlotTooltipManager displays the pixmap in its built-in PixmapPopup widget.
_tooltip_mgr = std::make_unique<PlotTooltipManager>(this, 100); // 100ms dwell for responsiveness

_tooltip_mgr->setHitTestProvider([this](QPoint pos) -> std::optional<PlotTooltipHit> {
    QPointF world = screenToWorld(pos);
    PlotTooltipHit hit;
    hit.world_x = static_cast<float>(world.x());
    hit.world_y = static_cast<float>(world.y());
    return hit;
});

_tooltip_mgr->setContentProvider([this](PlotTooltipHit const & hit) -> PlotTooltipContent {
    PlotTooltipContent content;
    content.pixmap = renderDistributionHistogram(hit.world_x);
    return content;
});

The HeatmapWidget Roadmap Phase 8 uses the same PlotTooltipManager with a pixmap content provider for its miniature PSTH + raster tooltips.

Widget Tooltip Content Content Type
EventPlotWidget Trial index + time Text (implemented)
LinePlotWidget Vertical histogram of Y values at hovered time point Pixmap
HeatmapWidget Miniature PSTH + raster for hovered unit Pixmap
ScatterPlotWidget Point coordinates + TimeFrameIndex Text

4.4 Hover Detection

Hover detection is handled by PlotTooltipManager::onMouseMove(), called from LinePlotOpenGLWidget::mouseMoveEvent(). The manager’s dwell timer prevents expensive distribution computations during rapid mouse movement. Tooltips are automatically suppressed during panning via the is_interacting parameter.

4.5 Configuration

Add to LinePlotStateData:

struct TooltipConfig {
    bool enabled = false;
    int histogram_bins = 20;
    bool show_summary_stats = true;   // Mean, median overlay
};

Phase 5: SVG Export

Status: Not started. Infrastructure exists in PlottingSVG library (proven with EventPlotWidget and DataViewer_Widget).

Goal: Allow the user to save the current plot view as an SVG file for publication-quality figures.

Architecture Assessment

The LinePlotWidget rendering pipeline is not directly compatible with PlottingSVG. Unlike other plot widgets that build a RenderableScene, LinePlotWidget uses a specialized BatchLineRenderer + BatchLineStore pipeline for GPU performance. The scene is stored as LineBatchData (segments, line IDs, selection/visibility masks) — not as a RenderableScene.

Key issues to address:

  1. No RenderableScene: Trial lines are rendered via BatchLineRenderer, bypassing the standard SceneRenderer → RenderableScene path entirely. _scene_renderer is only used for the selection preview overlay and is otherwise cleared/empty.
  2. LineBatchData → RenderablePolyLineBatch conversion needed: A helper function must reconstruct polylines from the segment-based LineBatchData format. CPU-side data is always available via _line_store.cpuData().
  3. Per-line colors stored in GPU VBO: Group colors and feature colors are applied via the BatchLineRenderer’s color override VBO, not stored in LineBatchData. The conversion helper must also extract per-line colors from the renderer’s color state.
  4. Background color hardcoded: Set via glClearColor(0.1f, 0.1f, 0.1f, 1.0f) with no state accessor. A background_color field must be added to LinePlotStateData.

Step 5.1: Create LineBatchData → RenderablePolyLineBatch converter

Create a reusable conversion helper in CorePlotting/LineBatch/. This enables any widget using LineBatchData (LinePlotWidget, TemporalProjectionViewWidget, OnionSkinViewWidget) to produce SVG.

/// @file LineBatchDataConverter.hpp
namespace CorePlotting {

/// Convert a LineBatchData to a RenderablePolyLineBatch suitable for SVG export.
///
/// Reconstructs continuous polylines from the segment-based storage format.
/// Applies visibility and selection masks: invisible lines are excluded,
/// selected lines use @p selected_color, unselected use @p default_color.
///
/// @param batch         CPU-side line batch data (from BatchLineStore::cpuData())
/// @param default_color Color for unselected lines
/// @param selected_color Color for selected lines
/// @param per_line_colors Optional per-line color overrides (e.g., from group coloring).
///                        If non-empty, overrides default_color for each visible line.
/// @return PolyLine batch ready for PlottingSVG::SVGPolyLineRenderer
[[nodiscard]] RenderablePolyLineBatch convertLineBatchToPolyLines(
    LineBatchData const & batch,
    glm::vec4 default_color = {1.0f, 1.0f, 1.0f, 1.0f},
    glm::vec4 selected_color = {1.0f, 0.6f, 0.0f, 0.9f},
    std::vector<glm::vec4> const & per_line_colors = {});

} // namespace CorePlotting

Algorithm: 1. Iterate over batch.lines (logical lines) 2. Skip lines where visibility_mask[line_idx] == 0 3. For each visible line, extract segments from batch.segments using LineInfo::first_segment and segment_count 4. Reconstruct polyline vertices: first segment’s start vertex, then each segment’s end vertex (segments share endpoints, so {x1,y1,x2,y2} → vertex chain is {x1,y1, x2,y2} for the first segment, then {x2,y2} for subsequent segments) 5. Populate line_start_indices and line_vertex_counts per polyline 6. Assign color from per_line_colors[line_idx] (if available), selected_color (if selected), or default_color

Files to create: - src/CorePlotting/LineBatch/LineBatchDataConverter.hpp - src/CorePlotting/LineBatch/LineBatchDataConverter.cpp

Files to modify: - src/CorePlotting/CMakeLists.txt — add new source files

Tests to create: - tests/CorePlotting/LineBatchDataConverter.test.cpp — verify conversion with known segment data, visibility masks, selection masks, and per-line colors

Verify: Build compiles. Tests pass.

Step 5.2: Add background_color to LinePlotStateData

Add a background color field to the state, matching the EventPlot/Heatmap pattern.

Files to modify: - src/WhiskerToolbox/Plots/LinePlotWidget/Core/LinePlotStateData.hpp — add std::string background_color = "#1A1A1A"; - src/WhiskerToolbox/Plots/LinePlotWidget/Core/LinePlotState.hpp — add getter/setter with backgroundColorChanged() signal - src/WhiskerToolbox/Plots/LinePlotWidget/Rendering/LinePlotOpenGLWidget.cpp — in initializeGL(), read background color from state instead of hardcoding

Verify: Build compiles. Background color driven by state.

Step 5.3: Add exportToSVG() to LinePlotOpenGLWidget

Build a temporary RenderableScene from the cached LineBatchData and current matrices.

[[nodiscard]] QString exportToSVG();

Implementation:

QString LinePlotOpenGLWidget::exportToSVG() {
    auto const & cpu_data = _line_store.cpuData();
    if (cpu_data.numLines() == 0) {
        return {};
    }

    // Extract per-line colors from BatchLineRenderer's color override state
    auto const per_line_colors = _line_renderer.getPerLineColors();

    // Convert LineBatchData → RenderablePolyLineBatch
    glm::vec4 default_color{1.0f, 1.0f, 1.0f, 1.0f};  // Or from line style state
    glm::vec4 selected_color{1.0f, 0.6f, 0.0f, 0.9f};
    auto poly_batch = CorePlotting::convertLineBatchToPolyLines(
        cpu_data, default_color, selected_color, per_line_colors);

    // Build temporary RenderableScene
    CorePlotting::RenderableScene scene;
    scene.poly_line_batches.push_back(std::move(poly_batch));
    scene.view_matrix = _view_matrix;
    scene.projection_matrix = _projection_matrix;

    PlottingSVG::SVGSceneRenderer renderer;
    renderer.setScene(scene);
    renderer.setCanvasSize(_widget_width, _widget_height);

    if (_state) {
        renderer.setBackgroundColor(_state->getBackgroundColor().toStdString());
    }

    return QString::fromStdString(renderer.render());
}

Note on getPerLineColors(): The BatchLineRenderer applies per-line color overrides via a GPU VBO (e.g., from group coloring). A getPerLineColors() accessor must be added to expose the CPU-side color array. If group coloring is not active, this returns an empty vector and the converter falls back to default_color.

Files to modify: - src/WhiskerToolbox/Plots/LinePlotWidget/Rendering/LinePlotOpenGLWidget.hpp — add exportToSVG() declaration - src/WhiskerToolbox/Plots/LinePlotWidget/Rendering/LinePlotOpenGLWidget.cpp — implement - src/PlottingOpenGL/LineBatch/BatchLineRenderer.hpp — add getPerLineColors() accessor (returns the CPU-side std::vector<glm::vec4> used for color overrides) - src/WhiskerToolbox/Plots/LinePlotWidget/CMakeLists.txt — add PlottingSVG to target_link_libraries (PRIVATE)

Verify: Build compiles.

Step 5.4: Add exportSVGRequested signal to LinePlotPropertiesWidget

Add an “Export SVG” button to the properties panel.

Files to modify: - src/WhiskerToolbox/Plots/LinePlotWidget/UI/LinePlotPropertiesWidget.hpp — add signals: void exportSVGRequested(); - src/WhiskerToolbox/Plots/LinePlotWidget/UI/LinePlotPropertiesWidget.cpp — create a QPushButton in an “Export” collapsible section, connect clicked → exportSVGRequested()

Verify: Build compiles. Button appears.

Step 5.5: Add handleExportSVG() to LinePlotWidget

Follow the EventPlotWidget::handleExportSVG() pattern:

void LinePlotWidget::handleExportSVG() {
    QString const fileName = AppFileDialog::getSaveFileName(
            this, QStringLiteral("export_line_plot_svg"),
            tr("Export Line Plot to SVG"),
            tr("SVG Files (*.svg);;All Files (*)"));
    if (fileName.isEmpty()) return;

    QString const svg = _opengl_widget->exportToSVG();
    if (svg.isEmpty()) {
        QMessageBox::warning(this, tr("Export Failed"),
            tr("No scene to export. Load data and configure the plot first."));
        return;
    }

    QFile file(fileName);
    if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
        QMessageBox::critical(this, tr("Export Failed"),
            tr("Could not open file for writing:\n%1").arg(fileName));
        return;
    }

    QTextStream out(&file);
    out << svg;
    file.close();

    QMessageBox::information(this, tr("Export Successful"),
        tr("Line plot exported to:\n%1").arg(fileName));
}

Files to modify: - src/WhiskerToolbox/Plots/LinePlotWidget/UI/LinePlotWidget.hpp — add void handleExportSVG(); public slot - src/WhiskerToolbox/Plots/LinePlotWidget/UI/LinePlotWidget.cpp — implement

Verify: Build compiles.

Step 5.6: Wire signals in LinePlotWidgetRegistration

Connect the properties signal to the view slot in the create_editor_custom lambda:

QObject::connect(props, &LinePlotPropertiesWidget::exportSVGRequested,
                 view, &LinePlotWidget::handleExportSVG);

Files to modify: - src/WhiskerToolbox/Plots/LinePlotWidget/LinePlotWidgetRegistration.cpp

Verify: Full build succeeds.

Step 5.7: Manual validation

  1. Load a dataset with AnalogTimeSeries data
  2. Open a LinePlotWidget, configure alignment and add a series
  3. Test with:
    • Default uniform coloring
    • Group coloring enabled (color-by-group checkbox)
    • Trial selection (Ctrl+Click drag to select trials)
  4. Click “Export SVG” in the properties panel
  5. Open the resulting SVG in a web browser and/or Inkscape
  6. Verify:
    • Trial lines match on-screen positions
    • Visible/hidden trial filtering is correct
    • Selected trials have the correct highlight color
    • Group colors are applied when color-by-group is active
    • Background color is correct
    • Zoom/pan state is reflected

Design Notes — LineBatchData Conversion

The LineBatchData format stores line segments as flat {x1, y1, x2, y2} tuples with per-segment line IDs, while RenderablePolyLineBatch stores polylines as continuous vertex chains. The conversion reconstructs polylines by:

  • Iterating over each logical line’s contiguous segment range
  • Extracting the first segment’s start point, then each segment’s end point
  • Building line_start_indices[] and line_vertex_counts[]

This is a pure CPU operation on already-available data (BatchLineStore::cpuData() always maintains a CPU mirror regardless of GPU state).

Reuse: The convertLineBatchToPolyLines() helper benefits TemporalProjectionViewWidget and OnionSkinViewWidget, which also use BatchLineRenderer.


Phase 6: Cross-Widget Linking

Status: Design phase. Foundation exists via EditorRegistry::setCurrentTime() for double-click navigation.

Goal: Enable LinePlotWidget to participate in the SelectionContext system for inter-widget communication.

6.1 SelectionContext Integration

Following the pattern described in the EventPlot Roadmap Phase 6:

  • As receiver: When a DigitalEventSeries is selected in another widget, the LinePlotWidget could automatically update its alignment event key (unless pinned)
  • As source: When trials are selected, emit the selected alignment event EntityIDs through SelectionContext for other widgets to react

6.2 Pinning

Add a pinned flag to LinePlotStateData:

struct LinePlotStateData {
    // ... existing fields ...
    bool pinned = false;
};

When pinned, the widget ignores external SelectionContext changes. This enables workflows where one Line Plot is locked to a specific signal while another follows the user’s selection.

6.3 Companion Widget Workflow

The Line Plot Widget is the analog-signal companion to the discrete-event EventPlotWidget and PSTHWidget. A typical linked workflow:

User selects alignment event in any trial-aligned widget
        ↓
SelectionContext::setSelectedData(alignment_event_key)
        ↓
LinePlotWidget (unpinned) updates alignment event
        ↓
EventPlotWidget (unpinned) updates alignment event
        ↓
PSTHWidget (unpinned) updates alignment event
        ↓
All three widgets show data aligned to the same event

Phase 7: Multi-Series Rendering

Status: Partially implemented. The state supports multiple series (std::map<std::string, LinePlotOptions>) with per-series LineStyleData (color, thickness, alpha) and LineStyleState instances. The properties panel uses the shared LineStyleControls widget to edit the selected series’ style. However, the renderer currently only uses the first series key for data gathering.

Goal: Render multiple AnalogTimeSeries overlaid in the same plot, each with independent appearance.

7.1 Multi-Series Data Gathering

Extend rebuildScene() to iterate over all series:

for (auto const & [name, options] : _state->data().plot_series) {
    auto gathered = createAlignedGatherResult<AnalogTimeSeries>(
        _data_manager, options.series_key, alignment_data);
    // Build batch for this series with per-series color
    auto batch = buildLineBatchFromGatherResult(gathered, alignment_times);
    // Upload and render with series-specific color from options.hex_color
}

7.2 Per-Series Color in BatchLineRenderer

The BatchLineRenderer now supports per-line color overrides via a vec4 vertex attribute (implemented in Phase 1 for group coloring). Multi-series rendering can reuse this infrastructure by assigning each series’ color as the per-line override for its lines.

7.3 Legend

When multiple series are displayed, a legend should map series names to their colors. This could be rendered as:

  • An OpenGL overlay in the top-right corner of the plot
  • A separate legend widget in the properties panel

Dependency Graph

Phase 6: Cross-Widget Linking (uses groups for broadcast)

Phase 2: Mean / CI Overlay

Phase 3: External Feature Coloring
    ├── depends on: CorePlotting::Colormaps (shared w/ HeatmapWidget, EventPlotWidget)
    └── Per-line color in BatchLineRenderer (done in Phase 1)

Phase 4: Distribution Tooltips
    └── depends on: shared PlotTooltipRenderer (also needed by HeatmapWidget)

Phase 5: SVG Export
    └── depends on: shared Export infrastructure

Phase 7: Multi-Series Rendering
    └── Per-line color in BatchLineRenderer (done in Phase 1)

Phase 1 is complete. Phases 2, 3, and 5 are independent and can proceed in parallel. Phase 3 no longer blocked (per-line color infrastructure done in Phase 1). Phase 4 introduces new shared infrastructure.