Skip to content

plot: add stacked series composition#22

Merged
imakris merged 81 commits into
masterfrom
feature/stacked-series
Jul 11, 2026
Merged

plot: add stacked series composition#22
imakris merged 81 commits into
masterfrom
feature/stacked-series

Conversation

@imakris

@imakris imakris commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Implements a caller-visible stacked-series slice:

  • .stack_group(id) opt-in on ordinary series
  • independent source LOD/window selection
  • timestamp-union interpolation within the common valid domain
  • cumulative LINE/DOTS and AREA base/top bands
  • a generic renderer-owned Σ total overlay for every successfully composed stack: the final cumulative geometry is drawn above component primitives through the existing LINE pipeline, with a line width of Plot_config::line_width_px + 2px
  • exact overlay theme colors: dark mode #E6DFCC, light mode RGB inverse #192033; component fills, lines, and dots retain their own colors
  • total overlays in both main and preview views, including AREA-only and DOTS-only top components; singleton and rejected groups remain overlay-free
  • main/preview/auto-range/Qt flow
  • composition cache plus input/output/cache-hit observations
  • fail-closed behavior for incompatible stack inputs
  • global Stack functions toggle in the function plotter; existing and newly added functions share one stack while enabled
  • drag reordering from each function's color accent or f(xN) = label; the model and plot IDs update so the visible order is the actual stack order
  • native Qt SpinBox stepping, so repeated sample +/- clicks update both the displayed count and plotted samples after typed input
  • fractional function-domain x values in the data indicator, while axis tick formatting remains unchanged
  • raw component indicator values plus cumulative markers in plot-ID stack order and a textual Σ total; the indicator notes that markers show cumulative stack positions
  • marker geometry is renderer-gated and fail-closed for unresolved multi-member stacks, while a lone nonzero stack_group member keeps its ordinary raw marker
  • generic Plot_widget::auto_adjust_view / Fit Vertical fitting of current renderer-composed cumulative stacks, including AREA bases; stale or rejected stacks fail closed, and renderer-ineligible hidden peers do not suppress or contaminate singleton fitting
  • a width-neutral wrapped cumulative-marker note in the reusable PlotIndicator; x/value rows alone determine indicator width and wrapped note lines add height only

Correctness checks cover differing timestamps, independent LODs, overlap clipping, cache reuse/invalidation, rejected-stack suppression, auto-range, API propagation, function reordering, fractional indicator x formatting, raw component text, cumulative marker positions, note visibility and wrapping, renderer rejection/staleness, common-domain clipping, singleton marker behavior, stacked Fit Vertical envelopes, ordinary unstacked fitting, and hidden-peer renderer eligibility. Focused renderer checks additionally cover overlay presence and ordering, final cumulative geometry reuse, exact dark/light colors, thickness, multiple groups, singleton/rejected exclusion, main/preview rendering, AREA-only and DOTS-only tops, component-color preservation, and reuse of a top LINE component's existing line-window upload.

A native QRhi smoke renders two stacked AREA series with offset timestamps and validates composition, nonuniform readback, and pixels in the exact dark-mode overlay color #E6DFCC; the ordinary smoke remains unchanged. FunctionPlotterControls also verifies repeated sample stepping after typed input.

Independent review found one generic Fit Vertical eligibility blocker: a style-NONE/no-MAIN-layer peer could be counted as a stack member although the renderer skipped it. The fix now uses the renderer's existing MAIN eligibility API (qrhi_layers_for and draws_view) and a focused regression proves the visible singleton retains ordinary fitting. The bounded review of the total-overlay addition reported no blockers.

The text-enabled Release build and all 30 configured CTests pass, including both native QRhi smokes and the stacked AREA exact-color smoke. Task-touched files received canonical formatting; generic QML lint, diff checks, focused post-review tests, and a rebuilt function-plotter runtime load smoke also pass.

The isolated product review target is recovery/remove-process-damage..feature/stacked-series. This PR temporarily targets master so existing cross-platform workflows run; it depends on cleanup PR #21.

@imakris
imakris merged commit 87531ca into master Jul 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant