Page 1 of 1

Equation

Posted: Mon Nov 24, 2008 10:54 am
by 9350489
Hi Narcis,

I would build a program in delphi with TeeChart so that the user can enter the aquatic function and click on a display its image.

How will introduce the equation y:= f (x) in the code of the event
TForm1.TeeFunction1Calculate (Sender: TCustomTeeFunction;
CONST x: Double; VAR y: Double);

knowing it will be in the form of text there 'y:= f (x) '?

thank you for your help

Didier

Posted: Mon Nov 24, 2008 11:30 am
by narcis
Hi Didier,

You can use StrToFloat method for that, for example:

Code: Select all

procedure TCustomFunctionDemo.TeeFunction1Calculate(Sender: TCustomTeeFunction;
  const x: Double; var y: Double);
begin
  y:=StrToFloat('Sin(x/10)');
end;

Posted: Mon Nov 24, 2008 3:58 pm
by 9350489
Thank you Narcis !

another question :

how to revive the event "TeeFunction1Calculate"
because neither the repaint nor the invalidate work?

Didier

Posted: Mon Nov 24, 2008 5:16 pm
by narcis
Hi Didier,

You can try refreshing function's series datasource, for example:

Code: Select all

Series2.CheckDataSource;