Endpoint standalone /api/chart/underlying/{id} caricava un TOP 350
fisso; ora accetta ?years= (default 5, clamp 1-20) e la SP filtra per
data invece che per numero di righe.
Il prezzo usato resta Px_close/Px_closeadj in base ad
AdjustedPrices, senza fallback incrociato tra i due campi: quando
Px_closeadj non è backfillato prima di uno split (es. Apple, valorizzato
solo da inizio 2019), un fallback avrebbe mischiato dati adjusted/raw
creando un gradino artificiale nel grafico. La SP ora taglia lo storico
dove il campo scelto non è popolato.
Fix collaterale: skip righe con prezzo NULL prima del cast a decimal,
evitava un InvalidCastException con storici lunghi.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Append CapitalTrigger/CapitalValue columns (already read from
rpt_Events_CFT_ISIN) to both active and expired event tables.
Trim horizontal cell padding so all columns fit the page width.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- ChartDataServiceV2: aggiunto helper ToStr() per GetString null-safe su
colonne nullable (Sottostante, NomeCFT); pattern analogo a ToDecimal
- SkiaChartRendererV2: collision avoidance label margine destro — tutti i
label (barriere, strike, autocall, end-label serie) raccolti in lista,
ordinati per Y e distribuiti con spacing minimo 13px (push-down +
clamp-up) prima del disegno
- CLAUDE.md: documentati i due fix e la root cause cedlab_Chart_UL1
divide-by-zero su Strike=0 (fix DB: NULLIF(cu.Strike,0))
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
When format=jpg/jpeg and save=true, the chart is now saved to both:
- SavePath/{isin}.jpg (visible filename)
- SavePathEnc/{alias}.jpg (encoded filename, if alias exists)
This allows the external script to call the API once instead of twice
(no more separate jpg + jpgEnc calls). format=jpgEnc remains unchanged
for backward compatibility.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
PriceWorst is only populated by the SP for the WorstOf underlying.
For others, derive current price as (last Performance% / 100) * Strike.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- CTF line: black instead of red
- WorstOf line: red + end label shows "Name (value)" format
- Other underlyings: vivid palette (teal/amber/purple/sky/indigo/orange) instead of grey shades; end label shows name
- Barriera Capitale: brown to avoid confusion with WorstOf red
- PrezzoWorst dashed line: red aligned with WorstOf
- Legend font increased 10→12px
- Legend entry for WorstOf shows "Name (Worst Of)"
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>