two questions about drawing

TeeChart for ActiveX, COM and ASP
Post Reply
slyt
Newbie
Newbie
Posts: 1
Joined: Mon Oct 14, 2013 12:00 am

two questions about drawing

Post by slyt » Tue Oct 15, 2013 5:42 am

The questions
1. Could you tell me whether could the Teechart Pro activeX drawing in the background,how to realize it ?
I have a file with the dates of ten curves ,I need automatic read ,drawing and then saved as pictures .In the process I do not want display the teechart .
2. I want to know the method that when I draw the second straight line the first one could be deleted at the same time .
I use the download way to drawing :
GetCanvas().MoveTo(X,GetGetChartRect().GetBottom());
GetCanvas().LineTo(X,GetGetChartRect().GetTop());

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: two questions about drawing

Post by Yeray » Tue Oct 15, 2013 1:03 pm

Hi,
slyt wrote:1. Could you tell me whether could the Teechart Pro activeX drawing in the background,how to realize it ?
I have a file with the dates of ten curves ,I need automatic read ,drawing and then saved as pictures .In the process I do not want display the teechart .
You could have a chart in a form, hiden. And you could populate that chart, export it as an image, clear it, populate it again, export it, etc etc
Ie:

Code: Select all

  TChart1.Visible = False
  
  Dim i As Integer
  For i = 0 To 2
    TChart1.ClearChart
    TChart1.Aspect.View3D = False
    TChart1.AddSeries scLine
    TChart1.Series(0).FillSampleValues
    TChart1.Export.asBMP.SaveToFile "C:\tmp\MyBMPChart" + Trim$((i + 1)) + ".bmp"
  Next i
slyt wrote:2. I want to know the method that when I draw the second straight line the first one could be deleted at the same time .
I use the download way to drawing :
GetCanvas().MoveTo(X,GetGetChartRect().GetBottom());
GetCanvas().LineTo(X,GetGetChartRect().GetTop());
These functions are for custom drawing. If you want to draw a line at a time and anotherone at another time, you should control this adding logic at the OnAfterDraw event, where the custom drawing techniques you pointed are usually used.

If any of the above aren't exaclty what you are trying to achieve, please try to arrange a simple example project we can run as-is to reproduce the exact situation you are experiencing.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply