01a042cc - Keep portfolio chart visible when holdings are zero - #951
Conversation
|
EN: DE: DetailsReview pass 1 (98eed05): 0 findings on quality and logic. Coverage Floor Gate failed at 99.9% vs a 100% line floor because the old Review pass 2 (e1aee89): that dead branch was removed; 0 findings on quality and logic. Open comments: none (issue comments, reviews, inline comments, and review threads all empty). Mergeability: CI at |
|
EN: DE: |
An all-zero window used to set minY=maxY=0, so fl_chart drew no curve. Floor the Y-range at 5 currency units and allow a negative minY in that case so the zero line sits in the chart instead of on the clipped axis.
The 5.0 floor always feeds a positive deviation into the line calculator, so the old collapse path was dead and left line coverage at 99.9% against a 100% floor.
The existing portfolio-history snapshot only covers a non-zero curve. This variant pins the visible Y-range when every holding is zero.
A missing baseline does not write a failures/ diff. Re-render on the same self-hosted runner and attach the PNGs so they can be committed.
Rendered on the self-hosted visual-regression runner. Reverts the temporary artifact-upload workflow change used to capture the PNG.
0524d83 to
562ff0a
Compare
Those mixed-history windows used to collapse to an empty plot. After the cubit floor they render a visible zero line; take the self-hosted runner captures as the new baselines. MAX was unchanged.
Period windows in the cubit start at local midnight. Fixtures that kept the current clock time shifted the zero-line by a few pixels between CI runs, so 1W/1M/3M goldens could not settle.
Rendered on the self-hosted visual-regression runner against the midnight-aligned customer-report fixtures.
A 1Y view whose next interior sample is months later used to draw a stub from mid-chart. Carry the last value before minX to the window edge so the stroke spans the selected period.
Rendered on the self-hosted visual-regression runner after holding the last pre-window value at minX.
Holdings cannot go negative. The all-zero floor used to center the range on 0 and label -6…4; clamp the bottom line so the scale is 0…10 and the zero stroke sits on the axis.
Rendered on the self-hosted visual-regression runner after clamping the holdings scale to non-negative values.
EN:
The portfolio development chart disappeared for time windows where every holding is zero.
The cubit now keeps a Y-range from 0 so the line stays drawn, and holds the last value before the window so the stroke spans the selected period.
A dashboard golden records the all-zero MAX view; the customer-report 1W–1J goldens show that full-width zero line on a 0…10 axis.
Unit tests cover an all-zero series, a one-week window of zeros, and carrying a pre-window sample to minX.
DE:
Die Bestandsentwicklung verschwand in Zeitfenstern, in denen jeder Punkt 0 ist.
Der Cubit hält jetzt eine Y-Spanne ab 0, damit die Linie gezeichnet bleibt, und übernimmt den letzten Wert vor dem Fenster, damit der Strich die gewählte Periode ausfüllt.
Ein Dashboard-Golden dokumentiert die Null-MAX-Ansicht; die Kunden-Goldens 1W–1J zeigen diese volle Null-Linie auf einer Achse 0…10.
Unit-Tests decken eine Null-Serie, ein 1W-Null-Fenster und das Nachziehen eines Werts vor minX ab.
Details
When every visible point is 0,
average * 0.05was 0, sominY == maxY == 0andLineChartdrew no curve. The cubit now falls back to a 5.0 currency-unit floor so the chart has a Y-range. Holdings cannot go negative: the bottom line is always clamped to 0 (scale 0…10 for an all-zero series), not centered through negative labels.A clipped period (1W/1M/3M/1J) previously started the stroke at the first interior sample. If that sample sat months into the window, the line began mid-chart. The last sample before
minXis now held at the window edge so the stroke spans the selected period. An empty window (every sample older than the period) stays empty.dashboard_portfolio_chart_zero.pngis the all-zero MAX view. After #953, the mixed-history 1W/1M/3M/1J goldens pin the full-width zero line on the 0-axis.