Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/AddOn/TChart    [ Add a report in this area ]  
Report #:  123825   Status: Closed
Issue with TChartAxis.Title  (TeeChart Lite for Delphi XE5)
Project:  Delphi Build #:  19.0.14356.6604
Version:    19.2 Submitted By:   Eivind Slettvold
Report Type:  Basic functionality failure Date Reported:  4/4/2014 2:32:45 AM
Severity:    Serious / Highly visible problem Last Updated: 4/15/2014 6:30:39 PM
Platform:    All versions Internal Tracking #:   49703
Resolution: Fixed (Resolution Comments) Resolved in Build: : XE6
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
When setting text to TChartAxis.Title.Caption, and TChart.OnGetAxislabel is assigned, space is made as if the text was drawn perpendicular to the axis.

Issue is not present if TChart.OnGetAxisLabel is not assigned.
Steps to Reproduce:
See attached code example

----------
unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, VclTee.TeeGDIPlus, VCLTee.TeEngine,
  VCLTee.Series, Vcl.ExtCtrls, VCLTee.TeeProcs, VCLTee.Chart, VCLTee.EditChar,
  Vcl.StdCtrls, Vcl.Samples.Spin, VCLTee.TeeConst;

type
  TForm1 = class(TForm)
    Panel1: TPanel;
    Chart1: TChart;
    CheckBox1: TCheckBox;
    Edit1: TEdit;
    SpinEdit1: TSpinEdit;
    Label1: TLabel;
    Label2: TLabel;
    procedure Chart1GetAxisLabel(Sender: TChartAxis; Series: TChartSeries;
      ValueIndex: Integer; var LabelText: string);
    procedure CheckBox1Click(Sender: TObject);
    procedure Edit1Change(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure SpinEdit1Change(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis; Series: TChartSeries;
  ValueIndex: Integer; var LabelText: string);
begin
  //
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  if checkbox1.checked then

  chart1.OnGetAxisLabel:=Chart1GetAxisLabel
  else
   chart1.OnGetAxisLabel:=nil;
  chart1.Repaint;
end;

procedure TForm1.Edit1Change(Sender: TObject);
begin
   chart1.LeftAxis.Title.caption:=edit1.Text;
   chart1.BottomAxis.Title.caption:=edit1.Text;

end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  edit1.Text:='Very long Title string';
  checkbox1.checked:=true;
  chart1.Title.Caption:='TeeBuild = '+VclTee.TeeConst.TeeBuild;

end;

procedure TForm1.SpinEdit1Change(Sender: TObject);
begin
  chart1.LeftAxis.TitleSize:=SpinEdit1.Value;
  chart1.BottomAxis.TitleSize:=SpinEdit1.Value;
end;

end.
----------
Workarounds
Set TChartAxis.TitleSize to other value than 0
Attachment
123825.zip
Comments

Tomohiro Takahashi at 4/5/2014 2:29:28 AM -
What version(build no) of Delphi do you use, for example Delphi XE5 Update2(19.0.14356.6604) etc.?

Eivind Slettvold at 4/7/2014 3:47:19 AM -
Embarcadero® Delphi® XE5 Version 19.0.14356.6604
XE5 Update 2

Teechart Lite v2014.10.140123 (http://cc.embarcadero.com/item/29708)

David Berneda at 4/7/2014 7:24:22 AM -
This issue has been fixed in the last build

Eivind Slettvold at 6/20/2014 4:43:55 AM -
Where is this build available?

Tomohiro Takahashi at 4/7/2014 5:19:22 PM -
Will we be able to get the latest Lite edition for XE5 Update2 ?

Server Response from: ETNACODE01