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,9 +1,9 @@
<svg viewBox="0 0 683 610" xmlns="http://www.w3.org/2000/svg" style="width:100%;height:auto;font:12px sans-serif">
<text x="24" y="100" fill="#333" style="font-weight:bold">Cât de aproape de suport e prețul — daily, exemplu construit</text>
<rect x="58.4" y="294.2" width="484.0" height="37.4" fill="#1a5fb4" fill-opacity="0.08" stroke="#1a5fb4" stroke-width="1"/>
<line x1="24" y1="331.6" x2="669" y2="331.6" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
<text x="30" y="325.6" fill="#1a5fb4">suport monthly 48.00</text>
<line x1="24" y1="294.2" x2="669" y2="294.2" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="5 3"/>
<line x1="24.0" y1="331.6" x2="669" y2="331.6" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
<text x="30.0" y="325.6" fill="#1a5fb4">suport monthly 48.00</text>
<line x1="24.0" y1="294.2" x2="669" y2="294.2" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="5 3"/>
<text x="655" y="288.2" fill="#1a5fb4" text-anchor="end">suport + 3 % = 49.44</text>
<polyline points="352.9,222.8 367.9,231.8 382.9,239.7 397.9,247.4 412.9,254.9 427.9,261.4 442.9,267.8 457.9,273.7 472.9,278.8 487.9,283.6 502.9,288.2 517.9,291.8 532.9,294.5" fill="none" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
<text x="539" y="272.0" fill="#b06000">SMA-20</text>

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB