Hello!
I have some problems with generating Series(TFastlineSeries) with for loop. I would like to create 10 Series (TFastLineSeries) at runtime or on form creation... But then I have problems with displaying all 10 series on Chart.
Now I have code like that:
procedure TForm2.Button1Click(Sender: TObject);
var X,Y:single;
i, j:integer;
Series: TFastLineSeries;
begin
for j:=0 to 9 do
begin
Series:= TFastLineSeries.Create(Chart1);
Series.Name := 'Series'+IntToStr(j);
Series.XValues.Order:=loNone;
Series.YValues.Order:=loNone;
// calc points for circles
for i := 0 to 360 - 1 do
begin
X := (10+j*10) * cos ( i*PI/180 );
Y := (10+j*10) * sin ( i*PI/180 );
Series.AddXY(X,Y,'',clRed);
end;
Chart1.SeriesList.Add(Series);
Chart1.SeriesList.AllActive:=true;
end;
I expect that I would see 10 circles with different radius, but nothing happend to Chart.... I assume that there should be some code to display or refresh these 10 series on chart.
Does anybody know how can I display those 10 series.
Thank you in advance.
BR
Runtime TFastlineSeries creation
either10046032 wrote: Chart1.AddSeries(Series);
Code: Select all
Series.ParentChart:=Chart1
Code: Select all
Series:= TFastLineSeries.Create(Self);
Regards, Alexander
=================
TeeChart Pro v8.05, Delphi 5 & Turbo Delphi Professional for Win32., Delphi & C++Builder 2009
=================
TeeChart Pro v8.05, Delphi 5 & Turbo Delphi Professional for Win32., Delphi & C++Builder 2009
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi BR,
Have other users suggestions helped?
Also notice that if you are planning to draw circles you may be interested in using bubble series where you can specify each bubble center (X,Y) and radius. You could set bubble series brush to bsClear if you only want the pen being drawn, for example:
Have other users suggestions helped?
Also notice that if you are planning to draw circles you may be interested in using bubble series where you can specify each bubble center (X,Y) and radius. You could set bubble series brush to bsClear if you only want the pen being drawn, for example:
Code: Select all
Series1.Brush.Style:=bsClear;
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 |
Working!
Thank you guys you realy helped me a lot.
There are so many properties for TChart that I lost myself within it.
About drawing the circles... that was only an example to show you what I mean (easier to describe problem).
Thank you again.
BR
Aljosa
There are so many properties for TChart that I lost myself within it.
About drawing the circles... that was only an example to show you what I mean (easier to describe problem).
Thank you again.
BR
Aljosa
How to assign Series to axis
With your answer you helped me a lot. But I have one more question to ask you.
I have three axes. Left, right and bottom... At first when I create those TFastLineSeries and add it to TChart they are assigned to LeftAxis and Bottom Axis...
How can I switch between combinations of LeftAxis&BottomAxis or RightAxis&BottomAxis?
So I want to assign series sometimes to left axis and sometimes to right axis (bottom is always present)... How can I do that?
Thanks in advance!
BR
Aljosa
I have three axes. Left, right and bottom... At first when I create those TFastLineSeries and add it to TChart they are assigned to LeftAxis and Bottom Axis...
How can I switch between combinations of LeftAxis&BottomAxis or RightAxis&BottomAxis?
So I want to assign series sometimes to left axis and sometimes to right axis (bottom is always present)... How can I do that?
Thanks in advance!
BR
Aljosa
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aljosa,
You'll find information on that at Tutorial 6 - Working with Series, specially at the Choose Axes for a Series section. You'll find the tutorials at TeeChart's program group.
Hope this helps!
You'll find information on that at Tutorial 6 - Working with Series, specially at the Choose Axes for a Series section. You'll find the tutorials at TeeChart's program group.
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 |