From 924256986a604bccb7f96e285ddcbac7ba629b04 Mon Sep 17 00:00:00 2001 From: ask Date: Tue, 6 Dec 2011 23:14:33 +0000 Subject: [PATCH] TAChart: Cosmetic style fixes git-svn-id: trunk@34008 - --- components/tachart/demo/axis/axisdemo.lpi | 2 +- components/tachart/demo/chartsource/main.pas | 2 +- components/tachart/demo/radial/main.lfm | 8 ++++++-- components/tachart/demo/radial/radialdemo.lpi | 4 ++-- components/tachart/talegend.pas | 14 +++++++------- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/components/tachart/demo/axis/axisdemo.lpi b/components/tachart/demo/axis/axisdemo.lpi index 8ffe45c130..87f74e700d 100644 --- a/components/tachart/demo/axis/axisdemo.lpi +++ b/components/tachart/demo/axis/axisdemo.lpi @@ -56,7 +56,7 @@ - + diff --git a/components/tachart/demo/chartsource/main.pas b/components/tachart/demo/chartsource/main.pas index f9d9f8ce7c..de312b6335 100644 --- a/components/tachart/demo/chartsource/main.pas +++ b/components/tachart/demo/chartsource/main.pas @@ -119,7 +119,7 @@ begin case rgDataShape.ItemIndex of 0: y := x; 1: y := Sin(x); - 2: if (x = 0) then y := 1 else y := Sin(x) / x; + 2: if x = 0 then y := 1 else y := Sin(x) / x; 3: y := Exp(-x / 3); 4: y := Exp(-Sqr((x - 2.5) / 2.5)); 5: y := Exp(-Sqr((x - 2.5) / 2.5)) + 0.05 * (Random - 0.5); diff --git a/components/tachart/demo/radial/main.lfm b/components/tachart/demo/radial/main.lfm index d53a19eda4..4b36e9f7ea 100644 --- a/components/tachart/demo/radial/main.lfm +++ b/components/tachart/demo/radial/main.lfm @@ -28,12 +28,14 @@ object Form1: TForm1 Width = 558 AxisList = < item - Title.LabelFont.Orientation = 900 Visible = False + Minors = <> + Title.LabelFont.Orientation = 900 end item - Alignment = calBottom Visible = False + Alignment = calBottom + Minors = <> end> Foot.Brush.Color = clBtnFace Foot.Font.Color = clBlue @@ -145,10 +147,12 @@ object Form1: TForm1 Width = 558 AxisList = < item + Minors = <> Title.LabelFont.Orientation = 900 end item Alignment = calBottom + Minors = <> end> Foot.Brush.Color = clBtnFace Foot.Font.Color = clBlue diff --git a/components/tachart/demo/radial/radialdemo.lpi b/components/tachart/demo/radial/radialdemo.lpi index 8f337274f8..28b3fef2f5 100644 --- a/components/tachart/demo/radial/radialdemo.lpi +++ b/components/tachart/demo/radial/radialdemo.lpi @@ -31,7 +31,7 @@ - + @@ -61,7 +61,7 @@ - + diff --git a/components/tachart/talegend.pas b/components/tachart/talegend.pas index 9aed2f0c7a..0101fd3558 100644 --- a/components/tachart/talegend.pas +++ b/components/tachart/talegend.pas @@ -140,12 +140,12 @@ type laTopRight, laCenterRight, laBottomRight); TChartLegendDrawingData = record + FBounds: TRect; + FColCount: Integer; FDrawer: IChartDrawer; FItems: TChartLegendItems; - FColCount: Integer; - FRowCount: Integer; FItemSize: TPoint; - FBounds: TRect; + FRowCount: Integer; end; TLegendColumnCount = 1..MaxInt; @@ -154,7 +154,7 @@ type { TChartLegend } TChartLegend = class(TChartElement) - private + strict private FAlignment: TLegendAlignment; FBackgroundBrush: TChartLegendBrush; FColumnCount: TLegendColumnCount; @@ -170,6 +170,9 @@ type FSymbolWidth: TChartDistance; FUseSidebar: Boolean; + // Not includes the margins around item. + function MeasureItem( + ADrawer: IChartDrawer; AItems: TChartLegendItems): TPoint; procedure SetAlignment(AValue: TLegendAlignment); procedure SetBackgroundBrush(AValue: TChartLegendBrush); procedure SetColumnCount(AValue: TLegendColumnCount); @@ -193,9 +196,6 @@ type procedure AddGroups(AItems: TChartLegendItems); procedure Assign(Source: TPersistent); override; procedure Draw(var AData: TChartLegendDrawingData); - // Not includes the margins around item. - function MeasureItem( - ADrawer: IChartDrawer; AItems: TChartLegendItems): TPoint; procedure Prepare(var AData: TChartLegendDrawingData; var AClipRect: TRect); procedure SortItemsByOrder(AItems: TChartLegendItems); published