Hide Comments
Hide Comments

Comments (0)

Occurs just before the chart panel paints itself. Use the OnDrawing event handler to take action before the chart panel draws. By setting the DoDraw parameter to False, the drawing can be cancelled. The Canvas parameter contains the canvas where the chart panel will be drawn, and the ARect parameter specifies where on the canvas the chart panel will be drawn.

The OnDrawing event occurs when the    Draw method is called or painting occurs but before the drawing actually starts.
 

Namespace: RSChartPanel

expandingSyntax

Delphi

public
  property OnDrawing: TRSChartDrawingEvent read FOnDrawing write FOnDrawing;
 

Value

Type: TRSChartDrawingEvent

expandingExamples

The following OnDrawing and OnDraw events create a clipping region before drawing the chart panel. The chart panel will be shown through a circular window (note that the charts will not be clipped in the round window as the charts reselect a new clipping region):

Delphi

procedure TForm1.RSChartPanel1Draw(Sender: TObject; const Canvas: TCanvas;
   ARect: TRect);
 begin
      SelectClipRgn(Canvas.Handle,0);
 end;
 
 procedure TForm1.RSChartPanel1Drawing(Sender: TObject;
   const Canvas: TCanvas; ARect: TRect; var DoDraw: Boolean);
 var
    Rgn: HRGN;
 begin
      InflateRect( ARect, -50, -50 );
      Rgn := CreateRoundRectRgn(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom, ARect.Right-ARect.Left, ARect.Bottom-Arect.Top);
      SelectClipRgn(Canvas.Handle,Rgn);
 end;

expandingSee Also

Comments (0)

RiverSoftAVG Charting Component Suite (RCCS) © 2005-2015, Thomas G. Grubb