svg_candles: cautarea nivelurilor, scoasa in functie comuna; 11 generatoare reparate

Unsprezece generatoare nu mai rulau deloc la HEAD: cautau <line x1="24", iar
svg_candles scrie x1="24.0" de cand are Level.i0. Un generator mort inseamna
ca diagrama nu mai poate fi regenerata, si nimeni n-ar fi aflat pana cand ar
fi incercat cineva, peste luni.

Cele 11 copii ale aceluiasi regex au disparut: y_niveluri() si offset_render()
se agata acum de semnatura liniei de Level (stroke-width + dasharray), nu de
x-ul ei. Caz nou in selftest, cu Level(i0=) si panou de volum - combinatia la
care varianta veche fie crapa, fie prindea tacut linia de zero a volumului.

41 de SVG-uri regenerate, toate identice cu cele comise dupa normalizarea
x1=24 -> x1=24.0, deci niciun desen n-a sarit. Verificarea asta a prins o
regresie reala: la buy_doji_transe substitutia lasase scaderea veche pe randul
urmator, offsetul se scadea de doua ori si desenul urca 92 px.

Inca doua generatoare moarte din aceeasi familie, gasite pe drum
(intrarea_cazul_lui, intrarea_doua_variante): desenau peste grafic citind
ch._y() fara offset. Nu crapau zgomotos - produceau suprapuneri la 22 px.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ThN7ixZrowca8aTGrK1MUJ
This commit is contained in:
Claude Agent
2026-10-02 06:12:32 +00:00
parent d82e1d5ce5
commit 84f933bcfa
60 changed files with 505 additions and 444 deletions

View File

@@ -1,8 +1,8 @@
<svg viewBox="0 0 660 380" xmlns="http://www.w3.org/2000/svg" style="width:100%;height:auto;font:12px sans-serif">
<text x="24" y="48" fill="#333" style="font-weight:bold">SPY — monthly: intrare ianuarie 2005 la 117.43 → TP1 +10 % = 129.17</text>
<line x1="24" y1="167.5" x2="646" y2="167.5" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
<line x1="24.0" y1="167.5" x2="646" y2="167.5" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
<text x="632" y="161.5" fill="#188a3e" text-anchor="end">intrare 117.43</text>
<line x1="24" y1="56.0" x2="646" y2="56.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
<line x1="24.0" y1="56.0" x2="646" y2="56.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
<text x="632" y="50.0" fill="#1a5fb4" text-anchor="end">TP1 129.17 (+10 %)</text>
<polyline points="325.0,151.8 340.0,149.8 355.0,147.9 370.0,145.9 385.0,143.7 400.0,141.0 415.0,138.2 430.0,135.2 445.0,132.0 460.0,128.7 475.0,125.2 490.0,121.7" fill="none" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
<line x1="40.0" y1="179.7" x2="40.0" y2="191.1" stroke="#1a1a1a" stroke-width="1.2"/>

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB