Модератор: Модераторы
uses
  ...,
  Series, Chart, TeEngine, TeeProcs;      
...
procedure TfrmRateHistory.FormCreate(Sender: TObject);
begin
  FHistoryCount := 0;
  FHistoryMax := 0;
  FCurrencyID := '';
  FFirstDate := Now();
  FLastDate := Now();
  FGraph := TChart.Create(Self);
  FGraph.Parent := Self;
  FGraph.Chart3DPercent := 30;
  FGraph.AllowZoom := False;
  FGraph.AllowPanning := pmHorizontal; // (pmNone,pmHorizontal,pmVertical,pmBoth);
  FGraph.ScrollMouseButton := mbLeft;
  FGraph.Align := alClient;
//  FGraph.Legend.Alignment := laRight; // (laLeft,laRight,laTop,laBottom)
  FGraph.Legend.Visible := False;
  FGraph.Title.Font.Size := 14;
  FGraph.LeftAxis.Title.Caption := 'Курс, руб.';
  FGraph.LeftAxis.Title.Font.Size := 10;
  FGraph.BottomAxis.LabelStyle := talText; // Стиль меток оси X (talAuto,talNone,talValue,talMark,talText)
  FGraph.BottomAxis.LabelsAngle := 90;
  FGraph.BottomAxis.LabelsFont.Size := 10;
end;
procedure TfrmRateHistory.DrawGraph;
var
  s: TLineSeries;
//  s: TBarSeries;
  i: Integer;
begin
  if FHistoryCount = 0 then
    Exit;
  FGraph.BottomAxis.SetMinMax(0, 19);
  FGraph.Title.Text.Clear;
  FGraph.Title.Text.Add(FCurrencyName + ' за период с ' + FormatDateTime('dd/mm/yy', FHistory[0].Date) + ' по ' + FormatDateTime('dd/mm/yy', FHistory[FHistoryCount - 1].Date));
  s := TLineSeries.Create(Self);
//  s := TBarSeries.Create(Self);
  s.ParentChart := FGraph;
//  s.Marks.Style := smsValue; // Это стиль меток над столбиками
  s.LineBrush := bsSolid; // (bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal,
                  // bsBDiagonal, bsCross, bsDiagCross, bsImage, bsPattern
  for i := 1 to FHistoryCount - 1 do
    s.Add(FHistory[i].RateValue / FHistory[i].Nominal, FormatDateTime('dd/mm/yy', FHistory[i].Date));
end;

Сейчас этот форум просматривают: Yandex [Bot] и гости: 1