Hi
I am having problem in previewing and printing the chart in TeeChart ActiveX 6. I have used two controls and I use Tee Preview Panel for preview and printing. My chart is generally drawn with many annotation tools. The problem is, when I use landscape orientation, it gives perfect result but when I change orientation to portrait it disturbs whole chart image and distorts everything. In short, the output doesn't remains as it displays on the screen.
Is there anything to take care while changing orientation ? Please help me.
Printing problem in TeeChart ActiveX V. 6
Hi Nitin,
in order for custom objects to print in the correct position you have to define their positions relative to other TeeChart objects and not as absolute pixel positions. Unfortunately the default positions are absolute pixel positions and so can't be used to print Charts - if you want to print an Annotation Tool in the ppLeftTop position, for example, you'll have to use code similar to the following (to see this work please create an .exe file from your VB project and print from there):
in order for custom objects to print in the correct position you have to define their positions relative to other TeeChart objects and not as absolute pixel positions. Unfortunately the default positions are absolute pixel positions and so can't be used to print Charts - if you want to print an Annotation Tool in the ppLeftTop position, for example, you'll have to use code similar to the following (to see this work please create an .exe file from your VB project and print from there):
Code: Select all
Private Sub Command1_Click()
TChart1.Printer.ShowPreview
End Sub
Private Sub Form_Load()
With TChart1
.AddSeries scLine
.Series(0).FillSampleValues 10
.Tools.Add tcAnnotate
With .Tools.Items(0).asAnnotation
.Text = "HELLO"
End With
End With
End Sub
Private Sub TChart1_OnBeforeDrawSeries()
With TChart1
With .Tools.Items(0).asAnnotation
.Shape.CustomPosition = True
.Shape.Left = TChart1.Axis.Left.Position - 30
.Shape.Top = TChart1.Axis.Top.Position - 30
End With
End With
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com