unit Unit1;

interface

uses
  Windows, ComCtrls,Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, TeeURL, TeeNavigator, TeeEdiGene, Grids, TeeChartGrid,
  TeePreviewPanel, TeeGalleryPanel, TeeEdit, StdCtrls, TeeLisB,
  TeeSeriesTextEd, TeeOpenGL, ExtCtrls, TeeProcs, TeeDraw3D, TeCanvas,
  TeePenDlg, TeEngine, TeeDBEdit, TeeDBCrossTab, DB, TeeData, SUIButton,
  SUIForm, TeeInspector, Chart, Series, TeeSmith, Buttons, TeeComma;

type
  TForm1 = class(TForm)
    Panel1: TPanel;
    Chart1: TChart;
    Series1: TBarSeries;
    ColorDialog1: TColorDialog;
    CheckBox1: TCheckBox;
    CheckBox2: TCheckBox;
    TeeCommander1: TTeeCommander;
    ChartListBox1: TChartListBox;
    Series2: TPointSeries;
    Series3: TBarSeries;
    Series4: TFastLineSeries;
    Series5: TFastLineSeries;
    Series6: TLineSeries;
    Series7: TLineSeries;
    Series8: TLineSeries;
    CheckBox3: TCheckBox;
    CheckBox4: TCheckBox;

    procedure FormActivate(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
    procedure CheckBox2Click(Sender: TObject);

  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}


procedure TForm1.FormActivate(Sender: TObject);
begin
BitBtn1.Font.Color := Series1.SeriesColor; 
end;


procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues(10);
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
if ColorDialog1.Execute then
begin
Series1.ColorEachPoint := false;
Bitbtn1.Font.Color := ColorDialog1.Color;
Series1.SeriesColor := ColorDialog1.Color;
end

end;

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
if CheckBox1.Checked then
   ChartListBox1.s.ShowLabels := true
   else
   ChartGrid1.ShowLabels := false;
end;

procedure TForm1.CheckBox2Click(Sender: TObject);
begin
Series1.ColorEachPoint := true;
if CheckBox2.Checked then
   ChartGrid1.ShowColors := true
   else
   ChartGrid1.ShowColors := false;
end;


end.
