Teechartpro 7.12 Drawing a graph
-
- Newbie
- Posts: 42
- Joined: Mon Jun 11, 2007 12:00 am
- Contact:
Teechartpro 7.12 Drawing a graph
Hi Narcis,
Can we draw the graph of any function with
teechart directly with his equation?
Thank you for your help
Didier
Can we draw the graph of any function with
teechart directly with his equation?
Thank you for your help
Didier
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Didier,
Yes, you can use custom function. You'll find an example at All Features\Welcome!\Functions\Extended\Custom y=f(x) in the new features demo, available at TeeChart's program group.
Yes, you can use custom function. You'll find an example at All Features\Welcome!\Functions\Extended\Custom y=f(x) in the new features demo, available at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 42
- Joined: Mon Jun 11, 2007 12:00 am
- Contact:
Hi Clara,
This works for me here.
This works for me here.
Code: Select all
procedure TForm1.TeeFunction1Calculate(Sender: TCustomTeeFunction;
const x: Double; var y: Double);
begin
//y := 2+3*(1+x)-5 + (abs(power(-x,2)) - x*x) * 2 - 1/(x + 1);
y := sin(x) + cos(x) - abs(tan(x)) + x;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 42
- Joined: Mon Jun 11, 2007 12:00 am
- Contact:
Hi Didier,
It's an event for TCustomTeeFunction. You should find it through Object inspector as usually if you added the function at design time (at the function object, not the series).
It's an event for TCustomTeeFunction. You should find it through Object inspector as usually if you added the function at design time (at the function object, not the series).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 42
- Joined: Mon Jun 11, 2007 12:00 am
- Contact:
-
- Newbie
- Posts: 42
- Joined: Mon Jun 11, 2007 12:00 am
- Contact:
Hi Didier,
That's strange. You should see a series and a teefunction.
Another test you can do could be to add a chart (and a function) to a new form at design time and see the declarations in the code generated. For me:
That's strange. You should see a series and a teefunction.
Another test you can do could be to add a chart (and a function) to a new form at design time and see the declarations in the code generated. For me:
Code: Select all
//...
type
TForm1 = class(TForm)
Chart1: TChart;
Series1: TLineSeries;
TeeFunction1: TCustomTeeFunction;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
//...
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 42
- Joined: Mon Jun 11, 2007 12:00 am
- Contact:
Hi Didier,
I'm happy to see that!
I'm happy to see that!
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Didier,
Please notice that I have splitted your last post into a new topic:
http://www.teechart.net/support/viewtopic.php?t=8798
It's better starting a new topic for each now issue. It's easier to follow up.
Please notice that I have splitted your last post into a new topic:
http://www.teechart.net/support/viewtopic.php?t=8798
It's better starting a new topic for each now issue. It's easier to follow up.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis,
How can I Draw this function with TeeFunction1Calculate
with three parameters :
Qf, S, Sa that can be defined by double
(exemple : Qf = 1, S = 8, Sa =4,3)
for this moment, I have a message "operation en virgule flottante incorrecte"
Thank you for your help
Didier
How can I Draw this function with TeeFunction1Calculate
with three parameters :
Qf, S, Sa that can be defined by double
(exemple : Qf = 1, S = 8, Sa =4,3)
Code: Select all
y := (Qf * S * 0.36 * x) / Sa;
Thank you for your help
Didier
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Didier,
You can do this:
If those constants need to be modified then you can create them as global variables in your unit.
Hope this helps!
You can do this:
Code: Select all
procedure TForm1.TeeFunction1Calculate(Sender: TCustomTeeFunction;
const x: Double; var y: Double);
const
Qf = 1;
S = 8;
Sa = 4.3;
begin
y := (Qf * S * 0.36 * x) / Sa;
end;
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |