Hide Comments
Hide Comments

Comments (0)

Ocurs after the chart panel has finished drawing. Write an OnDraw event handler to take specific action after the chart panel has finished drawing. The Canvas parameter points to the canvas where the the chart panel was drawn. The ARect rectangle contains the rectangle coordinates where the the chart panel was drawn.
 

The OnDraw event occurs when the    Draw method is called and after all drawing
 

Namespace: FMX.RS.ChartPanel

expandingSyntax

Delphi

public
  property OnDraw: TRSChartDrawEvent read FOnDraw write FOnDraw;
 

Value

Type: TRSChartDrawEvent

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