Hi,
is it possible to add calculation formulas during runtime. For example when a chart has 1 series to calculate with the values of this series and add the results to a second series. The second series will be created on runtime if required.
The calculation formula must be defined in a memo during runtime f.e. so that a user can calculate all things he need.
What is the best way to have such a functionality?
Thanks
Scripting/calculation options during runtime
-
- Newbie
- Posts: 9
- Joined: Fri Dec 03, 2004 5:00 am
- Location: Germany
Re: Scripting/calculation options during runtime
Hi UFriedrich,
I think you should use Custom function to represent the desired formula. Please take a look at the demo at All features\Welcome !\Functions\Extended\Custom y=f(x).
The problem will be when parsing your string from the memo to the function. This has already been discussed here.
I think you should use Custom function to represent the desired formula. Please take a look at the demo at All features\Welcome !\Functions\Extended\Custom y=f(x).
The problem will be when parsing your string from the memo to the function. This has already been discussed here.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 9
- Joined: Fri Dec 03, 2004 5:00 am
- Location: Germany
Re: Scripting/calculation options during runtime
Hi,
thanks for your answer.
In the meantime I've searched around and found a very excellent solution.
I'll use Python to make all things I need (business logic) and present them in a Delphi application an a chart component. Delphi as Host with the GUI and Python for all the calculations. Here is a complete example to do such things:
http://www.atug.com/andypatterns/Python ... ample1.htm
I've tested it in a small project and with this method I can use on Python side the ChartSeries object and can return calculated values to add them to another series. In the Python script I have the full power of a programming language with all the libraries and mudules are available around the world. Furthermore are components available I need for build a Python IDE with code highlighting, code completion, code checking and execution.
With all the things it's possible to extend a chart with powerfull custom functions.
Regards
thanks for your answer.
In the meantime I've searched around and found a very excellent solution.
I'll use Python to make all things I need (business logic) and present them in a Delphi application an a chart component. Delphi as Host with the GUI and Python for all the calculations. Here is a complete example to do such things:
http://www.atug.com/andypatterns/Python ... ample1.htm
I've tested it in a small project and with this method I can use on Python side the ChartSeries object and can return calculated values to add them to another series. In the Python script I have the full power of a programming language with all the libraries and mudules are available around the world. Furthermore are components available I need for build a Python IDE with code highlighting, code completion, code checking and execution.
With all the things it's possible to extend a chart with powerfull custom functions.
Regards
Re: Scripting/calculation options during runtime
Hi UFriedrich,
Thanks for sharing! It will help for sure other customers with similar problems.
Thanks for sharing! It will help for sure other customers with similar problems.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |