FPSpreadsheet: Fix positioning of y axis when axis.Position is cuGraph and the chart is a barchart.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9433 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2024-09-11 21:40:25 +00:00
parent e7338413f2
commit 813db1140e

View File

@ -2281,6 +2281,12 @@ begin
else
axis.Position := AWorkbookAxis.PositionValue;
axis.PositionUnits := cuGraph; // To do: cuAxis not yet implemented in TAChart...
// Workaround for barseries issue: When Position = 0 and PositionUnits = cuGraph
// the axis would be moved to the center of the 1st bar which looks
// ugly --> revert to cuPercent
if (axis.Position = 0) and (AWorkbookAxis.Chart.GetChartType = ctBar) then
axis.PositionUnits := cuPercent;
end;
end;
end;