mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 09:32:41 +02:00
TAChart: Add label angle control to the radial demo
git-svn-id: trunk@28693 -
This commit is contained in:
parent
6501a28e5a
commit
9267ee571f
@ -47,6 +47,7 @@ object Form1: TForm1
|
||||
ParentColor = False
|
||||
OnMouseDown = ChartPieMouseDown
|
||||
object ChartPiePieSeries1: TPieSeries
|
||||
Marks.Distance = 40
|
||||
Marks.Format = '%2:s'
|
||||
Marks.Style = smsLabel
|
||||
Exploded = True
|
||||
@ -60,7 +61,7 @@ object Form1: TForm1
|
||||
Width = 558
|
||||
Align = alTop
|
||||
Alignment = taLeftJustify
|
||||
Caption = 'Click on the slice to explodede/unxeplode it'
|
||||
Caption = 'Click on the slice to explode/unxeplode it'
|
||||
ClientHeight = 35
|
||||
ClientWidth = 558
|
||||
TabOrder = 1
|
||||
@ -74,13 +75,32 @@ object Form1: TForm1
|
||||
TabOrder = 0
|
||||
end
|
||||
object lblWords: TLabel
|
||||
Left = 428
|
||||
Left = 424
|
||||
Height = 14
|
||||
Top = 6
|
||||
Top = 10
|
||||
Width = 58
|
||||
Caption = 'Label words'
|
||||
ParentColor = False
|
||||
end
|
||||
object seLabelAngle: TSpinEdit
|
||||
Left = 360
|
||||
Height = 21
|
||||
Top = 6
|
||||
Width = 50
|
||||
Increment = 5
|
||||
MaxValue = 360
|
||||
MinValue = -360
|
||||
OnChange = seLabelAngleChange
|
||||
TabOrder = 1
|
||||
end
|
||||
object lblLabelAngle: TLabel
|
||||
Left = 296
|
||||
Height = 14
|
||||
Top = 10
|
||||
Width = 55
|
||||
Caption = 'Label angle'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -95,7 +115,7 @@ object Form1: TForm1
|
||||
'0|1|?|'
|
||||
'0|2|?|'
|
||||
'0|3|?|'
|
||||
'0|0|?|'
|
||||
'0|5|?|'
|
||||
)
|
||||
left = 440
|
||||
top = 136
|
||||
|
@ -17,14 +17,17 @@ type
|
||||
ChartPiePieSeries1: TPieSeries;
|
||||
ChartToolset1: TChartToolset;
|
||||
lblWords: TLabel;
|
||||
lblLabelAngle: TLabel;
|
||||
ListChartSource1: TListChartSource;
|
||||
PageControl1: TPageControl;
|
||||
Panel1: TPanel;
|
||||
seWords: TSpinEdit;
|
||||
seLabelAngle: TSpinEdit;
|
||||
tsPie: TTabSheet;
|
||||
procedure ChartPieMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure seWordsChange(Sender: TObject);
|
||||
procedure seLabelAngleChange(Sender: TObject);
|
||||
end;
|
||||
|
||||
var
|
||||
@ -81,5 +84,10 @@ begin
|
||||
ChartPie.Invalidate;
|
||||
end;
|
||||
|
||||
procedure TForm1.seLabelAngleChange(Sender: TObject);
|
||||
begin
|
||||
ChartPiePieSeries1.Marks.LabelFont.Orientation := seLabelAngle.Value * 10;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user