mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-18 18:20:20 +02:00
TAChart: Update axis demo
git-svn-id: trunk@24148 -
This commit is contained in:
parent
e1f162aa58
commit
73647cb247
@ -15,7 +15,7 @@
|
|||||||
<ResourceType Value="res"/>
|
<ResourceType Value="res"/>
|
||||||
</General>
|
</General>
|
||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<ProjectVersion Value=""/>
|
<StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
@ -59,7 +59,11 @@
|
|||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)\"/>
|
<IncludeFiles Value="$(ProjOutDir)\"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
|
<CodeGeneration>
|
||||||
|
<SmartLinkUnit Value="True"/>
|
||||||
|
</CodeGeneration>
|
||||||
<Linking>
|
<Linking>
|
||||||
|
<LinkSmart Value="True"/>
|
||||||
<Options>
|
<Options>
|
||||||
<Win32>
|
<Win32>
|
||||||
<GraphicApplication Value="True"/>
|
<GraphicApplication Value="True"/>
|
||||||
@ -67,6 +71,7 @@
|
|||||||
</Options>
|
</Options>
|
||||||
</Linking>
|
</Linking>
|
||||||
<Other>
|
<Other>
|
||||||
|
<WriteFPCLogo Value="False"/>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
|
@ -9,8 +9,6 @@ uses
|
|||||||
Interfaces, // this includes the LCL widgetset
|
Interfaces, // this includes the LCL widgetset
|
||||||
Forms, Main, TAChartLazarusPkg;
|
Forms, Main, TAChartLazarusPkg;
|
||||||
|
|
||||||
{$IFDEF WINDOWS}{$R axisdemo.rc}{$ENDIF}
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Application.Title := 'TAChart axis demo';
|
Application.Title := 'TAChart axis demo';
|
||||||
Application.Initialize;
|
Application.Initialize;
|
||||||
|
@ -1,74 +1,142 @@
|
|||||||
object Form1: TForm1
|
object Form1: TForm1
|
||||||
Left = 344
|
Left = 343
|
||||||
Height = 304
|
Height = 304
|
||||||
Top = 182
|
Top = 184
|
||||||
Width = 533
|
Width = 533
|
||||||
Caption = 'Form1'
|
Caption = 'TAChart axis demo'
|
||||||
ClientHeight = 304
|
ClientHeight = 304
|
||||||
ClientWidth = 533
|
ClientWidth = 533
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '0.9.29'
|
LCLVersion = '0.9.29'
|
||||||
object Chart1: TChart
|
object PageControl1: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 304
|
Height = 304
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 533
|
Width = 533
|
||||||
AxisList = <
|
ActivePage = tsCustomMarks
|
||||||
item
|
|
||||||
Alignment = calLeft
|
|
||||||
TickColor = clRed
|
|
||||||
Title.Caption = 'Left'
|
|
||||||
Title.Font.Orientation = 900
|
|
||||||
Title.Visible = True
|
|
||||||
Transformation.Logarithmic = True
|
|
||||||
Transformation.Offset = 0
|
|
||||||
Transformation.Scale = 1
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Alignment = calRight
|
|
||||||
Title.Caption = 'Right 1'
|
|
||||||
Title.Font.Orientation = 900
|
|
||||||
Title.Visible = True
|
|
||||||
Transformation.Offset = 0
|
|
||||||
Transformation.Scale = 1
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Alignment = calBottom
|
|
||||||
Title.Caption = 'Bottom'
|
|
||||||
Title.Distance = 0
|
|
||||||
Title.Visible = True
|
|
||||||
Transformation.Offset = 0
|
|
||||||
Transformation.Scale = 1
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Alignment = calRight
|
|
||||||
Grid.Visible = False
|
|
||||||
TickColor = clAqua
|
|
||||||
Title.Caption = 'Right 2'
|
|
||||||
Title.Visible = True
|
|
||||||
Transformation.Offset = 0
|
|
||||||
Transformation.Scale = 1
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Alignment = calTop
|
|
||||||
Inverted = True
|
|
||||||
Title.Caption = 'Top'
|
|
||||||
Transformation.Offset = 0
|
|
||||||
Transformation.Scale = 1
|
|
||||||
end>
|
|
||||||
Foot.Brush.Color = clBtnFace
|
|
||||||
Foot.Font.Color = clBlue
|
|
||||||
Title.Brush.Color = clBtnFace
|
|
||||||
Title.Font.Color = clBlue
|
|
||||||
Title.Text.Strings = (
|
|
||||||
'TAChart'
|
|
||||||
)
|
|
||||||
Align = alClient
|
Align = alClient
|
||||||
ParentColor = False
|
TabIndex = 1
|
||||||
object Chart1LineSeries1: TLineSeries
|
TabOrder = 0
|
||||||
AxisIndexY = 0
|
object tsMultiAxis: TTabSheet
|
||||||
SeriesColor = clBlack
|
Caption = 'Mutliple'
|
||||||
Source = RandomChartSource1
|
ClientHeight = 278
|
||||||
|
ClientWidth = 525
|
||||||
|
object Chart1: TChart
|
||||||
|
Left = 0
|
||||||
|
Height = 278
|
||||||
|
Top = 0
|
||||||
|
Width = 525
|
||||||
|
AxisList = <
|
||||||
|
item
|
||||||
|
Alignment = calLeft
|
||||||
|
TickColor = clRed
|
||||||
|
Title.Caption = 'Left'
|
||||||
|
Title.Font.Orientation = 900
|
||||||
|
Title.Visible = True
|
||||||
|
Transformation.Offset = 0
|
||||||
|
Transformation.Scale = 1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Alignment = calRight
|
||||||
|
Title.Caption = 'Right 1'
|
||||||
|
Title.Font.Orientation = 900
|
||||||
|
Title.Visible = True
|
||||||
|
Transformation.Offset = 0
|
||||||
|
Transformation.Scale = 1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Alignment = calBottom
|
||||||
|
Title.Caption = 'Bottom'
|
||||||
|
Title.Distance = 0
|
||||||
|
Title.Visible = True
|
||||||
|
Transformation.Offset = 0
|
||||||
|
Transformation.Scale = 1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Alignment = calRight
|
||||||
|
Grid.Visible = False
|
||||||
|
TickColor = clAqua
|
||||||
|
Title.Caption = 'Right 2'
|
||||||
|
Title.Visible = True
|
||||||
|
Transformation.Offset = 7
|
||||||
|
Transformation.Scale = 2
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Alignment = calTop
|
||||||
|
Inverted = True
|
||||||
|
Title.Caption = 'Top'
|
||||||
|
Transformation.Offset = 0
|
||||||
|
Transformation.Scale = -1
|
||||||
|
end>
|
||||||
|
Foot.Brush.Color = clBtnFace
|
||||||
|
Foot.Font.Color = clBlue
|
||||||
|
Title.Brush.Color = clBtnFace
|
||||||
|
Title.Font.Color = clBlue
|
||||||
|
Title.Text.Strings = (
|
||||||
|
'TAChart'
|
||||||
|
)
|
||||||
|
Align = alClient
|
||||||
|
ParentColor = False
|
||||||
|
object Chart1LineSeries1: TLineSeries
|
||||||
|
AxisIndexY = 0
|
||||||
|
SeriesColor = clBlack
|
||||||
|
Source = RandomChartSource1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object tsCustomMarks: TTabSheet
|
||||||
|
Caption = 'Customized marks'
|
||||||
|
ClientHeight = 278
|
||||||
|
ClientWidth = 525
|
||||||
|
object ChartCustomMarks: TChart
|
||||||
|
Left = 0
|
||||||
|
Height = 278
|
||||||
|
Top = 0
|
||||||
|
Width = 525
|
||||||
|
AxisList = <
|
||||||
|
item
|
||||||
|
Alignment = calLeft
|
||||||
|
Marks.Format = '$%0:.9g'
|
||||||
|
Marks.Style = smsCustom
|
||||||
|
Marks.Frame.Style = psSolid
|
||||||
|
Marks.LabelBrush.Color = clMoneyGreen
|
||||||
|
Marks.LabelBrush.Style = bsSolid
|
||||||
|
Marks.Source = ListChartSource1
|
||||||
|
Title.Font.Orientation = 900
|
||||||
|
Transformation.Offset = 0
|
||||||
|
Transformation.Scale = 1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Alignment = calBottom
|
||||||
|
Grid.Visible = False
|
||||||
|
Marks.Format = '%2:s'
|
||||||
|
Marks.LabelFont.Height = -13
|
||||||
|
Marks.LabelFont.Style = [fsBold]
|
||||||
|
Marks.Style = smsLabel
|
||||||
|
Marks.Source = ListChartSource1
|
||||||
|
TickLength = 0
|
||||||
|
Transformation.Offset = 0
|
||||||
|
Transformation.Scale = 1
|
||||||
|
end>
|
||||||
|
Foot.Brush.Color = clBtnFace
|
||||||
|
Foot.Font.Color = clBlue
|
||||||
|
Title.Brush.Color = clBtnFace
|
||||||
|
Title.Font.Color = clBlue
|
||||||
|
Title.Text.Strings = (
|
||||||
|
'TAChart'
|
||||||
|
)
|
||||||
|
Align = alClient
|
||||||
|
ParentColor = False
|
||||||
|
object ChartCustomMarksBarSeries1: TBarSeries
|
||||||
|
Marks.Frame.Visible = False
|
||||||
|
Marks.LabelBrush.Style = bsClear
|
||||||
|
BarBrush.Color = clGreen
|
||||||
|
BarPen.Color = clLime
|
||||||
|
BarPen.Width = 2
|
||||||
|
SeriesColor = clGreen
|
||||||
|
Source = ListChartSource1
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object RandomChartSource1: TRandomChartSource
|
object RandomChartSource1: TRandomChartSource
|
||||||
@ -81,4 +149,16 @@ object Form1: TForm1
|
|||||||
left = 216
|
left = 216
|
||||||
top = 108
|
top = 108
|
||||||
end
|
end
|
||||||
|
object ListChartSource1: TListChartSource
|
||||||
|
DataPoints.Strings = (
|
||||||
|
'1|19000|?|January'
|
||||||
|
'2|35000|?|February'
|
||||||
|
'3|31000|?|March'
|
||||||
|
'4|26000|?|April'
|
||||||
|
'5|37000|?|May'
|
||||||
|
'6|22000|?|June'
|
||||||
|
)
|
||||||
|
left = 216
|
||||||
|
top = 164
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,7 +5,7 @@ unit Main;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Forms, TAGraph, TASeries, TASources;
|
ComCtrls, Forms, TAGraph, TASeries, TASources;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -14,7 +14,13 @@ type
|
|||||||
TForm1 = class(TForm)
|
TForm1 = class(TForm)
|
||||||
Chart1: TChart;
|
Chart1: TChart;
|
||||||
Chart1LineSeries1: TLineSeries;
|
Chart1LineSeries1: TLineSeries;
|
||||||
|
ChartCustomMarks: TChart;
|
||||||
|
ChartCustomMarksBarSeries1: TBarSeries;
|
||||||
|
ListChartSource1: TListChartSource;
|
||||||
|
PageControl1: TPageControl;
|
||||||
RandomChartSource1: TRandomChartSource;
|
RandomChartSource1: TRandomChartSource;
|
||||||
|
tsMultiAxis: TTabSheet;
|
||||||
|
tsCustomMarks: TTabSheet;
|
||||||
procedure TChartAxisList1MarkToText(var AText: String; AMark: Double);
|
procedure TChartAxisList1MarkToText(var AText: String; AMark: Double);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user