fix: manual time ticks flood the X axis on long Speed-Run logs (fixed 0.25s/0.05s intervals)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 82/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- csharp
- Ambito
- data-visualization
Direzione di ricerca
Start with src/CastleOverlayV2/Plot/PlotManager.cs and ApplyManualTimeTicks, then inspect the nearby grid-styling code and GetTimeRange. Implement span-based major and minor intervals while preserving Drag mode’s current 0.25/0.05-second appearance. Verify with a short Drag log and a multi-minute Speed-Run log from Tests/, checking rendering responsiveness, label readability, and hover smoothness.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
PlotManager.ApplyManualTimeTicks generates a fixed-density tick grid: one labeled major every 0.25 s and one minor every 0.05 s across the entire plotted time range. That's perfect for Drag mode's ~3 s window, but Speed-Run mode plots the whole log — a 10,000-row log at 0.05 s/sample spans 500 s, producing ~2,000 labeled majors + 10,000 minors. Every tick is re-rendered on every mouse move (the hover handler calls _plot.Refresh() continuously), so long logs make the UI sluggish and the axis labels unreadably dense.
Root cause
src/CastleOverlayV2/Plot/PlotManager.cs:1208 — ApplyManualTimeTicks:
for (double pos = Math.Ceiling(minX / 0.25) * 0.25; pos <= maxX; pos += 0.25)
manual.AddMajor(pos, pos.ToString("0.00"));
for (double pos = Math.Ceiling(minX / 0.05) * 0.05; pos <= maxX; pos += 0.05)
manual.AddMinor(pos);
The 0.25 / 0.05 intervals are hardcoded regardless of span.
Suggested fix
Scale the interval to the span so tick count stays bounded (~10–40 majors). Pick the major interval from a ladder and derive the minor as major / 5:
double span = maxX - minX;
double major =
span <= 5 ? 0.25 :
span <= 12 ? 0.5 :
span <= 30 ? 1.0 :
span <= 60 ? 5.0 :
span <= 300 ? 10.0 :
30.0;
double minor = major / 5.0;
Then use major/minor in the two loops (format labels with "0.##" so 5 doesn't render as 5.00 unnecessarily — or keep "0.00" if you prefer the current look for short spans).
Constraints:
- Drag mode must look identical to today: its span is ~3.2 s (−0.5 → +2.5 plus padding), which the ladder above maps to 0.25/0.05 — verify this.
- Don't switch to ScottPlot's automatic tick generator unless the ladder proves insufficient; the manual generator is used deliberately for the grid styling below it (same method, lines ~1223–1228).
- The X range used here comes from
GetTimeRange— no changes needed there.
Acceptance criteria
- Drag mode rendering is pixel-identical to current behavior (0.25 s labels, 0.05 s grid).
- Speed-Run mode with a long log (several minutes) renders promptly and hover/mouse-move stays smooth.
- Axis labels are legible (no overlapping label text) at any zoom of a long log.
- Zooming in on a long log still shows sensible ticks (note: ticks are computed from the data span at plot time, not the zoom window — that limitation exists today and is out of scope; just don't make it worse).
Test plan
Manual: load a short drag log (Drag mode) → compare axis to a pre-change screenshot. Switch to Speed-Run mode, load the longest CSV in Tests/ (or duplicate rows in a copy to fake a 5-minute log) → confirm responsiveness while moving the mouse over the plot and readable labels.
Workflow (repo convention): branch from main as fix/adaptive-time-ticks, one logical change per PR, open with gh pr create including a test/verify plan. Do not merge — Stewart merges.
- Lingua principale
- C#
- Stelle
- 0
- Fork
- 1
- Merge medio
- 6h 35m
- PR unite (30g)
- 46
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stewmac570/DragOverlay
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
stewmac570/DragOverlay#191 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
stewmac570/DragOverlay#128 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
stewmac570/DragOverlay#121 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
stewmac570/DragOverlay#119 ·
I maintainer di solito rispondono entro 1 giorno
-
fix: RaceBox channel visibility is not restored on startup (+ dead injection loop in MainForm ctor)Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
stewmac570/DragOverlay#115 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di stewmac570/DragOverlay
Issue simili
-
Assert.That on a null non-generic IEnumerable throws ArgumentNullException, so IsNull() cannot passApertabug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
area/automation area/sdk kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
unoplatform/uno.templates#2406 ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
documentation trivial
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno