Page 1 of 1

Tee9New example don't work under Delphi 2010 or XE

Posted: Thu Oct 14, 2010 4:14 pm
by 16556001
I have some problem with the TeeNew project under Delphi2010 and Delphi XE.

For example this syntax is wrong:
Chart1.Axes.Bottom.Items.Add(0,'<FONT color=Blue size=15>000').Format.TextFormat:=ttfHtml;

After Chart1.Axes.Bottom.Items.Add() method nothing is admited. And parent of TChartAxes.

The example in the docementation:
with Chart1.Axes.Left do
begin
Items.Clear; // remove all custom labels
// add custom labels
Items.Add(123,'Hello').Font.Size:=16;
Items.Add(466,'Good'#13'Bye').Transparent:=False;
Items.Add(300);
with Items.Add(-100) do
begin
Transparent:=False;
Transparency:=50;
Color:=clBlue;
end;
end;

don't work under Delphi 2010 or XE.
Anaybody has an idea ?

Re: Tee9New example don't work under Delphi 2010 or XE

Posted: Fri Oct 15, 2010 9:45 am
by narcis
Hi Gerard,

This works fine for me here using Delphi XE with our current sources. Which exact TeeChart version are you using? Have you checked v2010.01.11004 available at the client download area?

Thanks in advance.

Re: Tee9New example don't work under Delphi 2010 or XE

Posted: Mon Oct 18, 2010 10:16 pm
by 16556001
Hi Narcis,

My version is 2010.01.11004 but the project Tee9New.dpr don't is not compiled. For example this procedure failed to compile with errors as you see on the screenshot join

procedure TAxis_RetrieveOldLabelsForm.Button1Click(Sender: TObject);
var t : Integer;
begin
with Chart1.Axes.Bottom do
begin
// Save old labels
for t:=0 to Items.Count-1 do
OldLabels.Add(Items.Item[t].Value,Items.Item[t].Text);

Items.Clear; // remove all custom labels

// add html custom labels
Items.Add(0,'<FONT color=Blue size=15>000').TextFormat:=ttfHtml;

{ Other way
Items.Add(1,'<b><FONT color=BLUE size=15>1st</b>');
items.Item[0].TextFormat := ttfHtml;
}

// add custom labels
Items.Add(1,'1st');
Items.Add(2,'2nd');

with Items.Add(3,'etc...') do
begin
Font.Size := 15;
Transparent:=False;
Transparency:=50;
Color:=clBlue;
end;
end;
end;


There is others problem with GDI+

Best regards

Re: Tee9New example don't work under Delphi 2010 or XE

Posted: Tue Oct 19, 2010 2:16 pm
by yeray
Hi Gerard,

I can compile and run the demo in the v2010.01 installer both in Delphi 2010 and XE without errors.
Could you please check that you have the TeeChart library paths in the top of the lists?
I see that both TextFormat (TTeeCustomShape) and Transparency (TTeeShape) were already present in v2010.00.

Re: Tee9New example don't work under Delphi 2010 or XE

Posted: Wed Oct 20, 2010 10:14 am
by 16556001
Hi Yerai and Narcis,

I don't understand the TaxisItem class:

TAxisItem=class
private
FFormat : TTeeShape;
FLabelPos : Integer;
FText : String;
FValue : Double;

IAxisItems : TAxisItems;

function GetFormat:TTeeShape;
procedure SetFormat(const Value:TTeeShape);
procedure SetText(const Value: String);
procedure SetValue(const Value: Double);
protected
function ActiveFormat:TTeeShape;
public
Destructor Destroy; override;

procedure Repaint;
property LabelPos:Integer read FLabelPos write FLabelPos;

//published (<-- Not TPersistent)

property Format:TTeeShape read GetFormat write SetFormat;
property Text:String read FText write SetText;
property Value:Double read FValue write SetValue;
end;


Delphi says that TextFormat and Transparency are not property frm TaxisItem class. It seems that it is good. My TeEngine.pas is perhaps not the good one?

Best regards and thanks for your help

Gérard.

Re: Tee9New example don't work under Delphi 2010 or XE

Posted: Wed Oct 20, 2010 12:16 pm
by 16556001
Hi,

I join a sample program where the example don't work.

Best regards

Gérard.

Re: Tee9New example don't work under Delphi 2010 or XE

Posted: Thu Oct 21, 2010 3:07 am
by 16556001
Hi,

I find the problem. The TAxisItem has a property name Format and this proerty has transparency font...
The example has to be rewritten in

Code: Select all

procedure TAxis_RetrieveOldLabelsForm.Button1Click(Sender: TObject);
var t : Integer;
begin
with Chart1.Axes.Bottom do
begin
// Save old labels
for t:=0 to Items.Count-1 do
OldLabels.Add(Items.Item[t].Value,Items.Item[t].Text);

Items.Clear; // remove all custom labels

// add html custom labels
Items.Add(0,'<FONT color=Blue size=15>000').Format.TextFormat:=ttfHtml;

{ Other way
Items.Add(1,'<b><FONT color=BLUE size=15>1st</b>');
items.Item[0]).Format.TextFormat := ttfHtml;
}

// add custom labels
Items.Add(1,'1st');
Items.Add(2,'2nd');

with Items.Add(3,'etc...').Format do
begin
Font.Size := 15;
Transparent:=False;
Transparency:=50;
Color:=clBlue;
end;
end;
end;

In the Tee9new project I find others problem:
  • in CircularGauge_Series unit the variable FrameElementPercents don't exist in the new Teechart and we have to create local variables.
    in TeeGDIPlusComponent unit the TeeGDIPlus1.AntiAliasText est de type TGDIPlusFontQuality and not a boolean. See below the interace of TeeGDIPLus
type
TGDIPlusFontQuality=(gpfBest, gpfDefault, gpfClearType, gpfNormal);

Re: Tee9New example don't work under Delphi 2010 or XE

Posted: Mon Oct 25, 2010 10:23 am
by narcis
Hi Gerard,

Code: Select all

In the Tee9new project I find others problem:

      in CircularGauge_Series unit the variable FrameElementPercents don't exist in the new Teechart and we have to create local variables.
      in TeeGDIPlusComponent unit the TeeGDIPlus1.AntiAliasText est de type TGDIPlusFontQuality and not a boolean. See below the interace of TeeGDIPLus
The demo works fine for us here using latest build available and Delphi XE. Can you please check that you installed correctly v2010.01.11004 in your IDE? That you have new version packages installed and that search paths point to the location where it is installed?

Thanks in advance.