fix: calculate current price for non-WorstOf end labels from series data

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>
This commit is contained in:
2026-05-28 11:16:46 +02:00
parent 6454420230
commit 52bda26a4b

View File

@@ -154,7 +154,8 @@ public static class SkiaChartRendererV2
color = OtherUlColors[otherColorIdx++ % OtherUlColors.Length];
thickness = 1f;
seriesLabel = ul.Sottostante;
endLabel = $"{ul.Sottostante} ({ul.PriceWorst:0.00})";
decimal currentPrice = ulPoints.Last().Performance / 100m * ul.Strike;
endLabel = $"{ul.Sottostante} ({currentPrice:0.00})";
}
DrawSeriesV2(canvas, plotArea, ulPoints, minDate, maxDate, minY, maxY, color, thickness);