TChart Polar Series Points Displayed Beyond the Circle

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
acmr
Newbie
Newbie
Posts: 4
Joined: Fri Nov 15, 2002 12:00 am

TChart Polar Series Points Displayed Beyond the Circle

Post by acmr » Thu Jul 08, 2004 3:52 am

Marjan

Your code example for Re #2: of "TChart Polar series used to present data to an operator"
<Chart1.Canvas.ClipEllipse(EllipseBoundingRectangle)>
does not work for me because of the following issues:
1. Chart1.Canvas is a TCanvas3D object.
2. The ClipEllipse() function belongs to the TeCanvas class and has the following arguments passed to it:
ClipEllipse(ACanvas: TTeeCanvas; Const Rect: TRect);

Can you please correct yours or my error or suggest a diferent method?

Tony Wright

PS. TTeeCanvas is a class found in TeCanvas.pas

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Thu Jul 08, 2004 7:39 am

Hi.

Which TeeChart version are you using ? Using TeeChart v7 the following code worked perfectly:

Code: Select all

procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
  Chart1.Canvas.UnClipRectangle;
end;

procedure TForm1.Chart1BeforeDrawSeries(Sender: TObject);
begin
  Chart1.Canvas.ClipEllipse(Rect(50,50,250,200),false);
end;
I've used Chart OnBeforeDrawSeries and OnAfterDraw events to perform the clipping on oval region (limited by Rect rectangle)).
Marjan Slatinek,
http://www.steema.com

acmr
Newbie
Newbie
Posts: 4
Joined: Fri Nov 15, 2002 12:00 am

Post by acmr » Thu Jul 08, 2004 10:06 pm

Thanks for your quick reply Marjan. Forgive me for not indicating that I am using TeeChart v6 and Delphi v7. In TeeChart v6 the ClipEllipse() procedure is found in the TeCanvas.pas unit and is not associated with any particular class.

Regards

Tony Wright

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Thu Jul 15, 2004 6:40 am

Hi, Tony.

See my other reply to your repost.
Marjan Slatinek,
http://www.steema.com

Post Reply