Update GraphWPF.pas (#3270)

если title больше одной строки, показывалась только последняя. теперь все строки будут показаны.
This commit is contained in:
dmkwketx 2025-05-12 21:14:21 +03:00 committed by GitHub
parent e9cf278fdd
commit e3a64850ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1786,6 +1786,8 @@ type
if real.IsNaN(YTicks) then
YTicks := Ticks(max-min);
var th := TextHeightP('0');
if title<>'' then
th := TextHeightP(title);
var tw := GetRY0.Step(YTicks).TakeWhile(ry -> ry <= max).Select(y -> TextWidthP(y.Round(YTicksPrecision).ToString)).Max;
var dd := TextWidthP(b.Round(xTicksPrecision).ToString)/2;
@ -2556,4 +2558,4 @@ initialization
__InitModule;
finalization
end.
end.