Page 1 of 1

TChart Polar Series Points Displayed Beyond the Circle

Posted: Thu Jul 08, 2004 3:52 am
by 8576393
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

Posted: Thu Jul 08, 2004 7:39 am
by Marjan
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)).

Posted: Thu Jul 08, 2004 10:06 pm
by 8576393
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

Posted: Thu Jul 15, 2004 6:40 am
by Marjan
Hi, Tony.

See my other reply to your repost.