diff --git a/.gitattributes b/.gitattributes index 0846412366..75604574bb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2271,6 +2271,10 @@ components/tachart/demo/multi/Main.lfm svneol=native#text/plain components/tachart/demo/multi/Main.pas svneol=native#text/pascal components/tachart/demo/multi/multidemo.lpi svneol=native#text/plain components/tachart/demo/multi/multidemo.lpr svneol=native#text/pascal +components/tachart/demo/radial/main.lfm svneol=native#text/plain +components/tachart/demo/radial/main.pas svneol=native#text/pascal +components/tachart/demo/radial/radialdemo.lpi svneol=native#text/plain +components/tachart/demo/radial/radialdemo.lpr svneol=native#text/pascal components/tachart/demo/rotate/Main.lfm svneol=native#text/pascal components/tachart/demo/rotate/Main.pas svneol=native#text/pascal components/tachart/demo/rotate/rotatedemo.lpi svneol=native#text/plain diff --git a/components/tachart/demo/radial/main.lfm b/components/tachart/demo/radial/main.lfm new file mode 100644 index 0000000000..6edd87cdc7 --- /dev/null +++ b/components/tachart/demo/radial/main.lfm @@ -0,0 +1,85 @@ +object Form1: TForm1 + Left = 477 + Height = 433 + Top = 164 + Width = 566 + Caption = 'Form1' + ClientHeight = 433 + ClientWidth = 566 + Position = poScreenCenter + LCLVersion = '0.9.29' + object PageControl1: TPageControl + Left = 0 + Height = 433 + Top = 0 + Width = 566 + ActivePage = tsPie + Align = alClient + TabIndex = 0 + TabOrder = 0 + object tsPie: TTabSheet + Caption = 'Pie' + ClientHeight = 407 + ClientWidth = 558 + object ChartPie: TChart + Left = 0 + Height = 372 + Top = 35 + Width = 558 + AxisList = < + item + Title.LabelFont.Orientation = 900 + Visible = False + end + item + Alignment = calBottom + Visible = False + end> + Foot.Brush.Color = clBtnFace + Foot.Font.Color = clBlue + Title.Brush.Color = clBtnFace + Title.Font.Color = clBlue + Title.Text.Strings = ( + 'TAChart' + ) + Toolset = ChartToolset1 + Align = alClient + ParentColor = False + OnMouseDown = ChartPieMouseDown + object ChartPiePieSeries1: TPieSeries + Exploded = True + Source = ListChartSource1 + end + end + object Panel1: TPanel + Left = 0 + Height = 35 + Top = 0 + Width = 558 + Align = alTop + Caption = 'Click on the slice to explodede/unxeplode it' + TabOrder = 1 + end + end + end + object ListChartSource1: TListChartSource + DataPoints.Strings = ( + '0|1|?|' + '0|2|?|' + '0|3|?|' + '0|1|?|' + '0|2|?|' + '0|3|?|' + '0|1|?|' + '0|2|?|' + '0|3|?|' + '0|0|?|' + ) + left = 440 + top = 136 + end + object ChartToolset1: TChartToolset + left = 440 + top = 80 + end +end diff --git a/components/tachart/demo/radial/main.pas b/components/tachart/demo/radial/main.pas new file mode 100644 index 0000000000..5e4560b32d --- /dev/null +++ b/components/tachart/demo/radial/main.pas @@ -0,0 +1,48 @@ +unit main; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, ComCtrls, ExtCtrls, SysUtils, FileUtil, Forms, Controls, + Graphics, Dialogs, TAGraph, TASeries, TASources, TATools; + +type + + { TForm1 } + + TForm1 = class(TForm) + ChartPie: TChart; + ChartPiePieSeries1: TPieSeries; + ChartToolset1: TChartToolset; + ListChartSource1: TListChartSource; + PageControl1: TPageControl; + Panel1: TPanel; + tsPie: TTabSheet; + procedure ChartPieMouseDown(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); + end; + +var + Form1: TForm1; + +implementation + +{$R *.lfm} + +{ TForm1 } + +procedure TForm1.ChartPieMouseDown( + Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +var + i: Integer; +begin + i := ChartPiePieSeries1.FindContainingSlice(Point(X, Y)); + if i < 0 then exit; + ListChartSource1.SetXValue(i, 0.2 - ListChartSource1[i]^.X); + ChartPie.Invalidate; +end; + +end. + diff --git a/components/tachart/demo/radial/radialdemo.lpi b/components/tachart/demo/radial/radialdemo.lpi new file mode 100644 index 0000000000..72b16bf39a --- /dev/null +++ b/components/tachart/demo/radial/radialdemo.lpi @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/tachart/demo/radial/radialdemo.lpr b/components/tachart/demo/radial/radialdemo.lpr new file mode 100644 index 0000000000..926952f58a --- /dev/null +++ b/components/tachart/demo/radial/radialdemo.lpr @@ -0,0 +1,20 @@ +program radialdemo; + +{$mode objfpc}{$H+} + +uses + {$IFDEF UNIX}{$IFDEF UseCThreads} + cthreads, + {$ENDIF}{$ENDIF} + Interfaces, // this includes the LCL widgetset + Forms, lazcontrols, main, tachartlazaruspkg + { you can add units after this }; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. +