unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
StdCtrls, Arrow, EditBtn, PopupNotifier, ExtCtrls, Grids, Chart, ButtonPanel,
DBGrids, TAGraph, TASeries, TASources, TAStyles, TATransformations, TATools,
TAMultiSeries, types, Math;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Chart1: TChart;
ChartAxisTransformations1: TChartAxisTransformations;
myautoscale: TAutoScaleAxisTransform;
mycheckbox: TCheckBox;
Memo1: TMemo;
Series1: TLineSeries;
GroupBox1: TGroupBox;
PageControl1: TPageControl;
StatusBar1: TStatusBar;
StringGrid1: TStringGrid;
TabSheet1: TTabSheet;
TabSheet3: TTabSheet;
procedure Button1Click(Sender: TObject);
procedure mycheckboxChange(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
maxx, maxy, x1, y1, x2, y2, x3, y3, x4, y4:real;
a1, a2:real;
Xg, Yg, Ix, Iy: real;
lser: TLineSeries;
x, y: integer;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
Chart1.Series.Clear;
lser:=TLineSeries.Create(Chart1);
for x:= 1 to 20 do
lser.AddXY(strtofloat(stringgrid1.Cells[1,x]),strtofloat(stringgrid1.Cells[2,x]));
chart1.AddSeries(lser);
lser.LinePen.Width:=2;
end;
procedure TForm1.mycheckboxChange(Sender: TObject);
begin
myautoscale.Enabled:=mycheckbox.Checked;
end;
end.