Hi,
How is it possible to change, at runtime, the title caption of the statistics series created by the statistics tool ?
Is-it possible to change the curve fitting parameters when the use the curve fitting with the statistics tool ?
Regards
Statistics tool
Hi,
If the function have been created by your hand in the code or design time, then you can reference to it and change it's titile,....
If these have been created automatically (at runtime, via Editor) by the Statistics tool then one way to change its title would be to use the OnAddSeries event, something like this :How is it possible to change, at runtime, the title caption of the statistics series created by the statistics tool ?
Code: Select all
procedure TForm1.Chart1AddSeries(Sender: TCustomChartSeries);
begin
// Depending on Series type you can customize the title here..
Chart1[Chart1.SeriesCount-1].Title :='Custom Title';
end;
They cannot be accessed if Series asociated to a Function have not been created by code or designtime before to add the SeriesStats Tool, as the tool creates a internal (no visible) Series function with default values. In the other case, if the function series exists (created via code or designtime) then you can change its parameters by referencing directly to them.Is-it possible to change the curve fitting parameters when the use the curve fitting with the statistics tool ?
Pep Jorge
http://support.steema.com
http://support.steema.com
Statistics tool
Hi,
If the user add a statistic tool, how is it possible to know, in the OnAddSeries event, that the serie has been created by the statistic tool.
How is it possible to know, for example, that this is the median serie. I woul'd like to put the good title for the good serie ('Median' for the median serie).
It's very important, because we can't use the statistic tool with "Serie1, Serie2..."instead of "Median, Average, Trend..." titles.
Regards
If the user add a statistic tool, how is it possible to know, in the OnAddSeries event, that the serie has been created by the statistic tool.
How is it possible to know, for example, that this is the median serie. I woul'd like to put the good title for the good serie ('Median' for the median serie).
It's very important, because we can't use the statistic tool with "Serie1, Serie2..."instead of "Median, Average, Trend..." titles.
Regards
Hi,
you coud use similar code to the following :
you coud use similar code to the following :
Code: Select all
procedure TForm1.Chart1AddSeries(Sender: TCustomChartSeries);
var tmp : TTeeFunctionClass;
begin
if assigned (Series1) then
with Sender as tchartseries do
begin
if FunctionType=nil then
tmp:=nil
else
begin
tmp:=TTeeFunctionClass(FunctionType.ClassType);
showmessage(tmp.classname);
Chart1[Chart1.SeriesCount-1].Title :=tmp.ClassName;
end
end;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com
Statistics tool
Hi,
Thanks.
But i would like to know how is it possible to set a title like :
'Curve fitting (Serie nnn)'
If i have different statistics tool in a chart, i would like to distinguish the series linked to the function :
Curve fitting (Serie 1)
Curve fitting (Serie 2)
In the OnAddSerie event, I need to find the serie linked to a function. I didn't find how to do that.
Regards
Thanks.
But i would like to know how is it possible to set a title like :
'Curve fitting (Serie nnn)'
If i have different statistics tool in a chart, i would like to distinguish the series linked to the function :
Curve fitting (Serie 1)
Curve fitting (Serie 2)
In the OnAddSerie event, I need to find the serie linked to a function. I didn't find how to do that.
Regards
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi stsl,
You can get the tool's series doing something like this:
You can get the tool's series doing something like this:
Code: Select all
procedure TForm1.Chart1AddSeries(Sender: TCustomChartSeries);
var i: Integer;
tmpSeries: TChartSeries;
begin
for i:=0 to Chart1.Tools.Count-1 do
begin
if (Chart1.Tools[i] is TSeriesStatsTool) then
begin
tmpSeries:=(Chart1.Tools[i] as TSeriesStatsTool).Series;
end;
end;
end;
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 |