unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, TeeProcs, TeEngine, Chart, Grids, Series;
type
TForm1 = class(TForm)
StringGrid1: TStringGrid;
Chart1: TChart;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
i: integer;
ABarSeries: TBarSeries;
begin
Randomize;
ABarSeries := TBarSeries.Create(Self);
Chart1.AddSeries(ABarSeries);
for i := 0 to 11 do begin
StringGrid1.Cells [0, i] := LongMonthNames [i + 1];
StringGrid1.Cells [1, i] := FloatToStr (Random * 1000);
ABarSeries.AddBar(StrToFloat (StringGrid1.Cells [1, i]), StringGrid1.Cells [0, i], Random ($FFFFFF))
end;
end;
end.