mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 21:30:23 +02:00
TAChart: Fix position of series labels at a multi-y-valued non-stacked bar series.
git-svn-id: trunk@60066 -
This commit is contained in:
parent
a9b6333383
commit
84a9df69ff
@ -1246,11 +1246,17 @@ end;
|
||||
|
||||
function TBarSeries.GetLabelDataPoint(AIndex, AYIndex: Integer): TDoublePoint;
|
||||
var
|
||||
ofs, w: Double;
|
||||
ofs, w, wbar: Double;
|
||||
begin
|
||||
Result := inherited GetLabelDataPoint(AIndex, AYIndex);
|
||||
BarOffsetWidth(TDoublePointBoolArr(Result)[IsRotated], AIndex, ofs, w);
|
||||
TDoublePointBoolArr(Result)[IsRotated] += ofs;
|
||||
|
||||
// Find x centers of bars in multi-y non-stacked bar series.
|
||||
if (not FStacked) and (Source.YCount > 1) then begin
|
||||
wbar := 2 * w / Source.YCount;
|
||||
TDoublePointboolArr(Result)[IsRotated] += (wbar * (AYIndex + 0.5) - w);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TBarSeries.GetLegendItems(AItems: TChartLegendItems);
|
||||
|
Loading…
Reference in New Issue
Block a user