From 17acb22f33dc33c8c81afa9959f67e9b3862a222 Mon Sep 17 00:00:00 2001 From: ask Date: Wed, 22 Aug 2012 08:24:46 +0000 Subject: [PATCH] TAChart: Add cuAxis element to TChartUnits type. Update axis demo. git-svn-id: trunk@38324 - --- components/tachart/demo/axis/main.lfm | 17 +++++++++-------- components/tachart/tachartaxis.pas | 3 ++- components/tachart/tachartutils.pas | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/components/tachart/demo/axis/main.lfm b/components/tachart/demo/axis/main.lfm index 78b2c9dea4..7947a2ee9e 100644 --- a/components/tachart/demo/axis/main.lfm +++ b/components/tachart/demo/axis/main.lfm @@ -404,9 +404,9 @@ object Form1: TForm1 end object lblPositionX: TLabel Left = 6 - Height = 14 + Height = 13 Top = 5 - Width = 42 + Width = 41 Caption = 'Position:' ParentColor = False end @@ -440,9 +440,9 @@ object Form1: TForm1 end object lblUnitsX: TLabel Left = 6 - Height = 14 + Height = 13 Top = 33 - Width = 29 + Width = 28 Caption = 'Units:' ParentColor = False end @@ -455,6 +455,7 @@ object Form1: TForm1 ItemIndex = 0 Items.Strings = ( 'percent' + 'axis' 'graph' 'pixel' ) @@ -476,9 +477,9 @@ object Form1: TForm1 TabOrder = 1 object lblPositionY: TLabel Left = 6 - Height = 14 + Height = 13 Top = 4 - Width = 42 + Width = 41 Caption = 'Position:' ParentColor = False end @@ -538,9 +539,9 @@ object Form1: TForm1 end object lblUnitsY: TLabel Left = 6 - Height = 14 + Height = 13 Top = 33 - Width = 29 + Width = 28 Caption = 'Units:' ParentColor = False end diff --git a/components/tachart/tachartaxis.pas b/components/tachart/tachartaxis.pas index 145963b520..d95faf7d45 100644 --- a/components/tachart/tachartaxis.pas +++ b/components/tachart/tachartaxis.pas @@ -728,7 +728,8 @@ begin r[Alignment], r[TChartAxisAlignment((Ord(Alignment) + 2) mod 4)], Position * PERCENT)); - cuGraph: + // TODO: Add OrthogonalAxis property to support cuAxis position. + cuAxis, cuGraph: if IsVertical then Result := FHelper.FTransf.XGraphToImage(Position) else diff --git a/components/tachart/tachartutils.pas b/components/tachart/tachartutils.pas index 372f3418de..52decbfc38 100644 --- a/components/tachart/tachartutils.pas +++ b/components/tachart/tachartutils.pas @@ -67,7 +67,7 @@ type TTransformFunc = function (A: Double): Double of object; - TChartUnits = (cuPercent, cuGraph, cuPixel); + TChartUnits = (cuPercent, cuAxis, cuGraph, cuPixel); TSeriesMarksStyle = ( smsCustom, { user-defined }