Hi
I am using TeeChart ActiveX ver 6.0.6 in my application. I am facing one problem since a month. I want to display image in annotation tool.
I can do it at design time or at runtime using chart editor by changing property Format -> Pattern -> Select Image. But at runtime there is no such propert available to annotation tool. Earlier I have raised same problem and the answer I got was to achieve this by using following statement
.asAnnotation.CallOut.Brush.LoadImage
This did not resolve my problem as it shows image in callout object not in main annotation tool object. I have tried to move callout object on the top of annotation tool object but second problem arose. All other annotation objects created after this annotation tool object are displaying image.
Is there any other way to display multiple images in chart without using annotation tool ? Also please tell me why teechart doesn't allow displaying image in main annotation tool object and why it allows to do it at design time or by using editor ? I don't want to use callout object as it doesnot solves my problem.
Please help me as I am stuck up for only this problem and I have to complete it soon.
Thanks
Nitin
How to display Image in Annotation Tool at Runtime - Urgent
Hi Nitin,
i.e. :
TChart1.Canvas.Draw 10, 10, Image1.Picture
TChart1.Tools.Items(0).asAnnotation.Shape.Brush.LoadImage "c:\..."
Yes, you can use the Canvas.Draw method (use it in the OnAfterDraw event) :Is there any other way to display multiple images in chart without using annotation tool ?
i.e. :
TChart1.Canvas.Draw 10, 10, Image1.Picture
This is because the TeeChart lack of the properties which allow to do this at runtime (via code). I'll add them for the next maintenance release of the TeeChart Pro v7 ( the v7.06). The code to use would be similar to :Also please tell me why teechart doesn't allow displaying image in main annotation tool object and why it allows to do it at design time or by using editor ? I don't want to use callout object as it doesnot solves my problem.
TChart1.Tools.Items(0).asAnnotation.Shape.Brush.LoadImage "c:\..."
Pep Jorge
http://support.steema.com
http://support.steema.com