TAChart: Fix positioning of labels on rotated axes. Issue #35535, idea by Marcin Wiazowski

git-svn-id: trunk@63677 -
This commit is contained in:
wp 2020-08-03 12:07:32 +00:00
parent 32f1e69fdd
commit bf2c904ffb
2 changed files with 5 additions and 1 deletions

View File

@ -769,7 +769,7 @@ begin
Result.FMin := AMin;
Result.FMax := AMax;
Result.FFormat := Marks.Format;
Result.FUseY := IsVertical;
Result.FUseY := IsVertical xor Marks.SourceExchangeXY;
Result.FAxisToGraph := @GetTransform.AxisToGraph;
Result.FGraphToAxis := @GetTransform.GraphToAxis;
Result.FGraphToImage := @FHelper.GraphToImage;

View File

@ -84,6 +84,7 @@ type
strict private
FDefaultListener: TListener;
FDefaultSource: TIntervalChartSource;
FSourceExchangeXY: Boolean;
FStripes: TChartStyles;
procedure SetStripes(AValue: TChartStyles);
strict protected
@ -95,6 +96,8 @@ type
ADrawer: IChartDrawer; AIsVertical: Boolean; ATickLength: Integer;
AValues: TChartValueTextArray): Integer;
property DefaultSource: TIntervalChartSource read FDefaultSource;
property SourceExchangeXY: Boolean
read FSourceExchangeXY write FSourceExchangeXY default false;
property Stripes: TChartStyles read FStripes write SetStripes;
end;
@ -138,6 +141,7 @@ type
property Range: TChartRange read FRange write SetRange;
property RotationCenter;
property Source: TCustomChartSource read FSource write SetSource;
property SourceExchangeXY;
property Stripes;
property Style default smsValue;
property TextFormat;