TAChart: Update rotate and multi demos to include mark positions

git-svn-id: trunk@30589 -
This commit is contained in:
ask 2011-05-06 15:28:47 +00:00
parent 553a073919
commit 434077f134
4 changed files with 66 additions and 12 deletions

View File

@ -87,24 +87,39 @@ object Form1: TForm1
ParentColor = False
object chStackedBarSeries1: TBarSeries
Active = False
Marks.YIndex = -1
Marks.Format = '%0:.2g'
Marks.LinkPen.Visible = False
Marks.Style = smsCustom
ZPosition = 5
BarBrush.Color = clRed
Depth = 10
MarkPositions = lmpInside
Source = ccsStacked
Styles = ChartStyles1
end
object chStackedLineSeries1: TLineSeries
Active = False
Marks.YIndex = -1
Marks.Format = '%0:.2g'
Marks.LinkPen.Visible = False
Marks.Style = smsCustom
Depth = 10
MarkPositions = lmpInside
Source = ccsStacked
Styles = ChartStyles1
end
object chStackedAreaSeries1: TAreaSeries
Marks.YIndex = -1
Marks.Format = '%0:.2g'
Marks.LinkPen.Visible = False
Marks.Style = smsCustom
ZPosition = 5
AreaContourPen.Color = clGreen
AreaContourPen.EndCap = pecSquare
AreaContourPen.Width = 2
Depth = 10
MarkPositions = lmpInside
Source = ccsStacked
Styles = ChartStyles1
UseZeroLevel = True

View File

@ -1,17 +1,17 @@
object Form1: TForm1
Left = 342
Height = 372
Height = 437
Top = 152
Width = 456
Caption = 'Form1'
ClientHeight = 372
ClientHeight = 437
ClientWidth = 456
DefaultMonitor = dmDesktop
Position = poScreenCenter
LCLVersion = '0.9.29'
LCLVersion = '0.9.31'
object Chart1: TChart
Left = 0
Height = 336
Height = 377
Top = 0
Width = 456
AxisList = <
@ -60,11 +60,11 @@ object Form1: TForm1
end
object Panel1: TPanel
Left = 0
Height = 36
Top = 336
Height = 60
Top = 377
Width = 456
Align = alBottom
ClientHeight = 36
ClientHeight = 60
ClientWidth = 456
TabOrder = 1
object cbRotateLine: TCheckBox
@ -103,6 +103,32 @@ object Form1: TForm1
OnChange = cbRotateAreaChange
TabOrder = 3
end
object cbMarkPositions: TComboBox
Left = 104
Height = 21
Top = 31
Width = 100
ItemHeight = 13
ItemIndex = 0
Items.Strings = (
'Outside'
'Positive'
'Negative'
'Inside'
)
OnChange = cbMarkPositionsChange
Style = csDropDownList
TabOrder = 4
Text = 'Outside'
end
object lblMarkPositions: TLabel
Left = 8
Height = 14
Top = 31
Width = 69
Caption = 'Mark positions'
ParentColor = False
end
end
object RandomChartSource1: TRandomChartSource
PointsNumber = 9

View File

@ -21,8 +21,11 @@ type
Chart1BarSeries1: TBarSeries;
Chart1LineSeries1: TLineSeries;
cbRotateLine: TCheckBox;
cbMarkPositions: TComboBox;
lblMarkPositions: TLabel;
Panel1: TPanel;
RandomChartSource1: TRandomChartSource;
procedure cbMarkPositionsChange(Sender: TObject);
procedure cbNegativeChange(Sender: TObject);
procedure cbRotateAreaChange(Sender: TObject);
procedure cbRotateBarChange(Sender: TObject);
@ -52,6 +55,12 @@ end;
{ TForm1 }
procedure TForm1.cbMarkPositionsChange(Sender: TObject);
begin
Chart1LineSeries1.MarkPositions :=
TLinearMarkPositions(cbMarkPositions.ItemIndex);
end;
procedure TForm1.cbNegativeChange(Sender: TObject);
begin
RandomChartSource1.YMin := -RandomChartSource1.YMin;

View File

@ -30,14 +30,18 @@
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="2">
<RequiredPackages Count="3">
<Item1>
<PackageName Value="TAChartLazarusPkg"/>
<MinVersion Major="1" Valid="True"/>
<PackageName Value="LCLBase"/>
<MinVersion Major="1" Release="1" Valid="True"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
<PackageName Value="TAChartLazarusPkg"/>
<MinVersion Major="1" Valid="True"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
</Item3>
</RequiredPackages>
<Units Count="2">
<Unit0>
@ -55,7 +59,7 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="9"/>
<Version Value="10"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="rotatedemo"/>