From 142639461e03f99ddb441b5592c4858c0c6a3066 Mon Sep 17 00:00:00 2001 From: ask Date: Mon, 29 Aug 2011 09:03:53 +0000 Subject: [PATCH] TAChart: Add panes demo git-svn-id: trunk@32089 - --- .gitattributes | 4 + .gitignore | 4 + components/tachart/demo/panes/Main.lfm | 156 ++++++++++++++++++++++++ components/tachart/demo/panes/Main.pas | 35 ++++++ components/tachart/demo/panes/panes.lpi | 92 ++++++++++++++ components/tachart/demo/panes/panes.lpr | 22 ++++ 6 files changed, 313 insertions(+) create mode 100644 components/tachart/demo/panes/Main.lfm create mode 100644 components/tachart/demo/panes/Main.pas create mode 100644 components/tachart/demo/panes/panes.lpi create mode 100644 components/tachart/demo/panes/panes.lpr diff --git a/.gitattributes b/.gitattributes index 58ba277c60..4aca7d21fe 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2421,6 +2421,10 @@ components/tachart/demo/opengl/Main.lfm svneol=native#text/plain components/tachart/demo/opengl/Main.pas svneol=native#text/pascal components/tachart/demo/opengl/opengldemo.lpi svneol=native#text/plain components/tachart/demo/opengl/opengldemo.lpr svneol=native#text/pascal +components/tachart/demo/panes/Main.lfm svneol=native#text/plain +components/tachart/demo/panes/Main.pas svneol=native#text/pascal +components/tachart/demo/panes/panes.lpi svneol=native#text/plain +components/tachart/demo/panes/panes.lpr svneol=native#text/pascal components/tachart/demo/print/Main.lfm svneol=native#text/plain components/tachart/demo/print/Main.pas svneol=native#text/pascal components/tachart/demo/print/printdemo.lpi svneol=native#text/plain diff --git a/.gitignore b/.gitignore index be82454b66..66dedc5e0f 100644 --- a/.gitignore +++ b/.gitignore @@ -196,6 +196,10 @@ components/tachart/demo/nogui/lib components/tachart/demo/opengl/*.exe components/tachart/demo/opengl/*.lps components/tachart/demo/opengl/lib +components/tachart/demo/panes/*.exe +components/tachart/demo/panes/*.lps +components/tachart/demo/panes/*.res +components/tachart/demo/panes/lib components/tachart/demo/print/*.exe components/tachart/demo/print/*.lps components/tachart/demo/print/lib diff --git a/components/tachart/demo/panes/Main.lfm b/components/tachart/demo/panes/Main.lfm new file mode 100644 index 0000000000..e0eb3a14b1 --- /dev/null +++ b/components/tachart/demo/panes/Main.lfm @@ -0,0 +1,156 @@ +object Form1: TForm1 + Left = 336 + Height = 630 + Top = 148 + Width = 620 + Caption = 'Form1' + ClientHeight = 630 + ClientWidth = 620 + LCLVersion = '0.9.31' + object PageControl1: TPageControl + Left = 0 + Height = 630 + Top = 0 + Width = 620 + ActivePage = tsLink + Align = alClient + TabIndex = 0 + TabOrder = 0 + object tsLink: TTabSheet + Caption = 'Link' + ClientHeight = 604 + ClientWidth = 612 + object chLink1: TChart + Left = 0 + Height = 200 + Top = 0 + Width = 612 + AxisList = < + item + Minors = <> + Title.LabelFont.Orientation = 900 + end + item + Alignment = calBottom + Minors = <> + end> + Foot.Brush.Color = clBtnFace + Foot.Font.Color = clBlue + Title.Brush.Color = clBtnFace + Title.Font.Color = clBlue + Title.Text.Strings = ( + 'TAChart' + ) + Align = alTop + ParentColor = False + object chLink1LineSeries1: TLineSeries + LinePen.Color = clNavy + LinePen.Width = 2 + Source = rcsLink1 + end + end + object chLink2: TChart + Left = 0 + Height = 200 + Top = 200 + Width = 612 + AxisList = < + item + Minors = <> + Title.LabelFont.Orientation = 900 + end + item + Alignment = calBottom + Minors = <> + end> + Foot.Brush.Color = clBtnFace + Foot.Font.Color = clBlue + Title.Brush.Color = clBtnFace + Title.Font.Color = clBlue + Title.Text.Strings = ( + 'TAChart' + ) + Align = alTop + ParentColor = False + object chLink2LineSeries1: TLineSeries + LinePen.Color = clNavy + LinePen.Width = 2 + Source = rcsLink2 + end + end + object chLink3: TChart + Left = 0 + Height = 200 + Top = 400 + Width = 612 + AxisList = < + item + Minors = <> + Title.LabelFont.Orientation = 900 + end + item + Alignment = calBottom + Minors = <> + end> + Foot.Brush.Color = clBtnFace + Foot.Font.Color = clBlue + Title.Brush.Color = clBtnFace + Title.Font.Color = clBlue + Title.Text.Strings = ( + 'TAChart' + ) + Align = alTop + ParentColor = False + object chLink3LineSeries1: TLineSeries + LinePen.Color = clNavy + LinePen.Width = 2 + Source = rcsLink3 + end + end + end + end + object rcsLink1: TRandomChartSource + PointsNumber = 50 + RandSeed = 2100819672 + XMax = 50 + XMin = 1 + YMax = 50 + YMin = 0 + left = 32 + top = 32 + end + object rcsLink2: TRandomChartSource + PointsNumber = 50 + RandSeed = 1938257043 + XMax = 50 + XMin = 1 + YMax = 50 + YMin = 0 + left = 28 + top = 232 + end + object ChartExtentLink1: TChartExtentLink + LinkedCharts = < + item + Chart = chLink1 + end + item + Chart = chLink2 + end + item + Chart = chLink3 + end> + left = 508 + top = 348 + end + object rcsLink3: TRandomChartSource + PointsNumber = 50 + RandSeed = 123452345 + XMax = 50 + XMin = 1 + YMax = 50 + YMin = 0 + left = 28 + top = 424 + end +end diff --git a/components/tachart/demo/panes/Main.pas b/components/tachart/demo/panes/Main.pas new file mode 100644 index 0000000000..acaccff599 --- /dev/null +++ b/components/tachart/demo/panes/Main.pas @@ -0,0 +1,35 @@ +unit Main; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, ComCtrls, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, + TAChartExtentLink, TAGraph, TASeries, TASources; + +type + TForm1 = class(TForm) + ChartExtentLink1: TChartExtentLink; + chLink1: TChart; + chLink1LineSeries1: TLineSeries; + chLink2LineSeries1: TLineSeries; + chLink3LineSeries1: TLineSeries; + chLink2: TChart; + chLink3: TChart; + PageControl1: TPageControl; + rcsLink1: TRandomChartSource; + rcsLink2: TRandomChartSource; + rcsLink3: TRandomChartSource; + tsLink: TTabSheet; + end; + +var + Form1: TForm1; + +implementation + +{$R *.lfm} + +end. + diff --git a/components/tachart/demo/panes/panes.lpi b/components/tachart/demo/panes/panes.lpi new file mode 100644 index 0000000000..00ea170f71 --- /dev/null +++ b/components/tachart/demo/panes/panes.lpi @@ -0,0 +1,92 @@ + + + + + + + + + + <ResourceType Value="res"/> + <UseXPManifest Value="True"/> + </General> + <i18n> + <EnableI18N LFM="False"/> + </i18n> + <VersionInfo> + <StringTable ProductVersion=""/> + </VersionInfo> + <BuildModes Count="1"> + <Item1 Name="Default" Default="True"/> + </BuildModes> + <PublishOptions> + <Version Value="2"/> + <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> + <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> + </PublishOptions> + <RunParams> + <local> + <FormatVersion Value="1"/> + </local> + </RunParams> + <RequiredPackages Count="2"> + <Item1> + <PackageName Value="TAChartLazarusPkg"/> + </Item1> + <Item2> + <PackageName Value="LCL"/> + </Item2> + </RequiredPackages> + <Units Count="2"> + <Unit0> + <Filename Value="panes.lpr"/> + <IsPartOfProject Value="True"/> + <UnitName Value="panes"/> + </Unit0> + <Unit1> + <Filename Value="Main.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="Form1"/> + <ResourceBaseClass Value="Form"/> + <UnitName Value="Main"/> + </Unit1> + </Units> + </ProjectOptions> + <CompilerOptions> + <Version Value="10"/> + <PathDelim Value="\"/> + <Target> + <Filename Value="panes"/> + </Target> + <SearchPaths> + <IncludeFiles Value="$(ProjOutDir)"/> + <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> + <Linking> + <Options> + <Win32> + <GraphicApplication Value="True"/> + </Win32> + </Options> + </Linking> + <Other> + <CompilerMessages> + <UseMsgFile Value="True"/> + </CompilerMessages> + <CompilerPath Value="$(CompPath)"/> + </Other> + </CompilerOptions> + <Debugging> + <Exceptions Count="3"> + <Item1> + <Name Value="EAbort"/> + </Item1> + <Item2> + <Name Value="ECodetoolError"/> + </Item2> + <Item3> + <Name Value="EFOpenError"/> + </Item3> + </Exceptions> + </Debugging> +</CONFIG> diff --git a/components/tachart/demo/panes/panes.lpr b/components/tachart/demo/panes/panes.lpr new file mode 100644 index 0000000000..964b6f989d --- /dev/null +++ b/components/tachart/demo/panes/panes.lpr @@ -0,0 +1,22 @@ +program panes; + +{$mode objfpc}{$H+} + +uses + {$IFDEF UNIX}{$IFDEF UseCThreads} + cthreads, + {$ENDIF}{$ENDIF} + Interfaces, // this includes the LCL widgetset + Forms, Main, tachartlazaruspkg + { you can add units after this }; + +{$R *.res} + +begin + Application.Title := 'TAChart panes demo'; + RequireDerivedFormResource := True; + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. +