Page 1 of 1

Drawing static custom 2D text and graphic on TChart3D

Posted: Sat Jun 21, 2014 6:58 am
by 16566563
Hi,

I would like to show custom text and a TGraphicControl based transparent visual component on a TChart3D - i.e. text and components drawn shell stay on a fixed position with reference to the TForm, independent of the Charts rotation / panning / zoom. Using the Textout / Moveto / lineto methods of the TChart3D's canvas will always draw in 3D and also move the custom text and graphic when the chart is rotated, zoomed etc.
Placing a TGrapicControl base component with its owner and parent property set to underlying TChart3D component does not allow for transparency - i.e. Textout in the overriden Paint method of the TGraphicControl descendent is not transparent and flickers a lot when the the Chart is rotated.
Is there a way to draw custom 2D text and 2D graphic on a TChart3D that stay on a fixed position when the Chart is rotated / zoomed using any of its methods ?

Best regards,

Klaus

Re: Drawing static custom 2D text and graphic on TChart3D

Posted: Mon Jun 23, 2014 8:52 am
by narcis
Hi Klaus,

You could try do the custom drawing in the OnAfterDraw event so objects will be placed with absolute positions.