mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 09:58:16 +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
|
ParentColor = False
|
||||||
OnMouseDown = ChartPieMouseDown
|
OnMouseDown = ChartPieMouseDown
|
||||||
object ChartPiePieSeries1: TPieSeries
|
object ChartPiePieSeries1: TPieSeries
|
||||||
|
Marks.Distance = 40
|
||||||
Marks.Format = '%2:s'
|
Marks.Format = '%2:s'
|
||||||
Marks.Style = smsLabel
|
Marks.Style = smsLabel
|
||||||
Exploded = True
|
Exploded = True
|
||||||
@ -60,7 +61,7 @@ object Form1: TForm1
|
|||||||
Width = 558
|
Width = 558
|
||||||
Align = alTop
|
Align = alTop
|
||||||
Alignment = taLeftJustify
|
Alignment = taLeftJustify
|
||||||
Caption = 'Click on the slice to explodede/unxeplode it'
|
Caption = 'Click on the slice to explode/unxeplode it'
|
||||||
ClientHeight = 35
|
ClientHeight = 35
|
||||||
ClientWidth = 558
|
ClientWidth = 558
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@ -74,13 +75,32 @@ object Form1: TForm1
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object lblWords: TLabel
|
object lblWords: TLabel
|
||||||
Left = 428
|
Left = 424
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 6
|
Top = 10
|
||||||
Width = 58
|
Width = 58
|
||||||
Caption = 'Label words'
|
Caption = 'Label words'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
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
|
end
|
||||||
end
|
end
|
||||||
@ -95,7 +115,7 @@ object Form1: TForm1
|
|||||||
'0|1|?|'
|
'0|1|?|'
|
||||||
'0|2|?|'
|
'0|2|?|'
|
||||||
'0|3|?|'
|
'0|3|?|'
|
||||||
'0|0|?|'
|
'0|5|?|'
|
||||||
)
|
)
|
||||||
left = 440
|
left = 440
|
||||||
top = 136
|
top = 136
|
||||||
|
@ -17,14 +17,17 @@ type
|
|||||||
ChartPiePieSeries1: TPieSeries;
|
ChartPiePieSeries1: TPieSeries;
|
||||||
ChartToolset1: TChartToolset;
|
ChartToolset1: TChartToolset;
|
||||||
lblWords: TLabel;
|
lblWords: TLabel;
|
||||||
|
lblLabelAngle: TLabel;
|
||||||
ListChartSource1: TListChartSource;
|
ListChartSource1: TListChartSource;
|
||||||
PageControl1: TPageControl;
|
PageControl1: TPageControl;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
seWords: TSpinEdit;
|
seWords: TSpinEdit;
|
||||||
|
seLabelAngle: TSpinEdit;
|
||||||
tsPie: TTabSheet;
|
tsPie: TTabSheet;
|
||||||
procedure ChartPieMouseDown(Sender: TObject; Button: TMouseButton;
|
procedure ChartPieMouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
procedure seWordsChange(Sender: TObject);
|
procedure seWordsChange(Sender: TObject);
|
||||||
|
procedure seLabelAngleChange(Sender: TObject);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -81,5 +84,10 @@ begin
|
|||||||
ChartPie.Invalidate;
|
ChartPie.Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.seLabelAngleChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ChartPiePieSeries1.Marks.LabelFont.Orientation := seLabelAngle.Value * 10;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user