TeeChartの使い方 軸設定

TeeChartの使い方 軸設定 (TeeChart Pro 8.06)

    With Chart1 do
    begin

        //Y軸
       LeftAxis.Title.Font.Size := 11;
       LeftAxis.Title.Caption := ‘Y-axis’;
       LeftAxis.LabelsFont.Size := 11;
       LeftAxis.AxisValuesFormat := ‘0.0##’;
       LeftAxis.Minimum := 0;
       LeftAxis.AutomaticMaximum := True;
       LeftAxis.AutomaticMinimum := False;
       //LeftAxis.Automatic := True;
       LeftAxis.Ticks.Visible := True;//目盛表示
       LeftAxis.TickLength := 5;//目盛の長さ
       LeftAxis.TicksInner.Visible := True;//内側目盛表示
       LeftAxis.TickInnerLength := 2;//内側目盛の長さ
       LeftAxis.MinorTicks.Visible := True;//副目盛表示
       LeftAxis.MinorTickLength := 3;//副目盛の長さ
       LeftAxis.Grid.Visible := True;//グリッド表示
       //目盛増加量(グリッド間隔) 小さすぎる場合は勝手に大きくなる
       LeftAxis.Increment := 0.5;
       //グリッド間隔が勝手に大きくなるのをなるべく防ぐには次のようにする
       LeftAxis.LabelsSeparation := 0;

       //第2Y軸
       RightAxis.Title.Font.Size := 11;
       RightAxis.Title.Caption := ‘2nd Y-axis’;
       RightAxis.LabelsFont.Size := 11;
       RightAxis.AxisValuesFormat := ‘0.0##’;
       RightAxis.Minimum := 0;
       RightAxis.Automatic := True;
       RightAxis.Grid.Visible := False;

       //X軸
       BottomAxis.Title.Font.Size := 11;
       BottomAxis.Title.Caption := ‘X-axis’;
       BottomAxis.LabelsFont.Size := 11;
       BottomAxis.AxisValuesFormat := ‘0’;
       BottomAxis.Automatic := True;
       BottomAxis.Grid.Visible := True;

   end;

TeeChartの使い方 凡例設定

TeeChartの使い方 凡例設定 (TeeChart Pro 8.06)

uessに TeEngineを追加

    With Chart1 do
    begin

      // 凡例————————————–
      //凡例を表示

       Legend.Visible := True;
      //位置 (laLeft, laRight, laTop, laBottom)
       Legend.Alignment := laRight;
      //カスタム位置(Trueの場合はLeft,Topで位置指定)
       Legend.CustomPosition := False;
      //背景色
       Legend.Color := clWindow;
      //文字を系列色にする
       Legend.FontSeriesColor := True;
      //行の反転
       Legend.Inverted := False;
      //凡例スタイル
      //(lsAuto:自動, lsSeries:系列名, lsValues:系列の値
      //, lsLastValues:最後の値, lsSeriesGroups:系列グループ)

       Legend.LegendStyle := lsSeries;
      //テキストスタイル
      //ltsPlain:文字列のみ, ltsLeftValue:値左側表示, ltsRightValue:値右側表示
      //, ltsLeftPercent:%左側表示, ltsRightPercent:%右側表示
      //, ltsXValue:X値, ltsValue:値, ltsPercent:%
      //, ltsXAndValue:X値と値, ltsXAndPercent:X値と%

       Legend.TextStyle := ltsPlain;
       Legend.Font.Size := 10;
      //影
       Legend.Shadow.Visible := True;
       Legend.ShadowSize := 1;
      //凡例とチャートの余白
       Legend.HorizMargin := 0;
      //チェックボックス
       Legend.CheckBoxes := False;
      //幅の自動調整
       Legend.ColumnWidthAuto := True;
      //行間隔
       Legend.VertSpacing := 0;
      //凡例タイトル
       Legend.Title.Visible := True;
       Legend.Title.Text.Clear;
       Legend.Title.Text.Add(‘Title’);
      //凡例に合わせてチャートサイズ変更
       Legend.ResizeChart := True;

   end;

TeeChartの使い方 タイトル,フッター

TeeChartの使い方 タイトル,フッター (TeeChart Pro 8.06)

    With Chart1 do
    begin

      //タイトル
       Title.Visible := True;
       Title.Font.Color := clBlack;
       Title.Font.Size := 11;
       Title.Text.Clear;
       Title.Text.Add(‘Title’);
       Title.Alignment := taCenter;
       Title.Transparent := False;
       Title.Shadow.Visible := True;

      //サブタイトル
       SubTitle.Visible := True;
       SubTitle.Font.Color := clBlue;
       SubTitle.Font.Size := 10;
       SubTitle.Text.Clear;
       SubTitle.Text.Add(‘SubTitle’);
       SubTitle.Alignment := taRightJustify;
       SubTitle.Transparent := True;

      //フッタータイトル
       Foot.Visible := True;
       Foot.Font.Color := clBlack;
       Foot.Font.Size := 11;
       Foot.Text.Clear;
       Foot.Text.Add(‘Footer’);
       Foot.Alignment := taCenter;
       Foot.Transparent := False;
       Foot.Shadow.Visible := False;

      //フッターサブタイトル
       SubFoot.Visible := True;
       SubFoot.Font.Color := clBlue;
       SubFoot.Font.Size := 10;
       SubFoot.Text.Clear;
       SubFoot.Text.Add(‘SubFooter’);
       SubFoot.Alignment := taLeftJustify;
       SubFoot.Transparent := True;

   end;