Dear Steema,
I would like to have a Rotated Ellipse behind a point series.
Is there any tool/series which is able to have rotated ellipses?
The shape series is pretty close, but it has no rotation. (as far as I see).
I have found a canvas function: self.Chart1.Canvas.RotatedEllips().
If no such an option I can write a tool.
Best Regards:
Ferenc
Rotated Ellipse Series
Re: Rotated Ellipse Series
Hello Ferenc,
Indeed, there's the RotatedEllipse method to manually draw rotated ellipses. Here it is an example of usage:
You could use it (ie at OnBeforeDrawSeries event) to draw them behind your point series. Ie:
Indeed, there's the RotatedEllipse method to manually draw rotated ellipses. Here it is an example of usage:
You could use it (ie at OnBeforeDrawSeries event) to draw them behind your point series. Ie:
Code: Select all
uses Series, TeCanvas;
procedure TForm1.Chart1BeforeDrawSeries(Sender: TObject);
var P : TPointArray;
tmpX, tmpY, i: Integer;
begin
with Chart1.Canvas do
begin
for i:=0 to Chart1[0].Count-1 do
begin
tmpX:=Chart1[0].CalcXPos(i);
tmpY:=Chart1[0].CalcYPos(i);
Brush.Color:=Chart1[0].ValueColor[i];
RotatedEllipse(tmpX-Round(10+random*10),tmpY-Round(10+random*10),tmpX+Round(10+random*10),tmpY+Round(10+random*10),0, random*360);
end;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Legend.Hide;
Chart1.View3D:=False;
with Chart1.AddSeries(TPointSeries) as TPointSeries do
begin
ColorEachPoint:=True;
FillSampleValues(10);
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |