Hi,
I want to keep aspect ratio while zooming. How can I do this using VBScript?
Thanks in advance,
Danila.
Keeping of aspect ratio while zooming
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Danila,
You could try doing something as in the Isometric Axis example at All Features\Welcome!\Axes in the features demo available at TeeChart's program group.
You could try doing something as in the Isometric Axis example at All Features\Welcome!\Axes in the features demo available at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hello Danila,
Sorry but I don't what are you trying to achieve exactly. Could you please give us some more details?
Thanks in advance.
Sorry but I don't what are you trying to achieve exactly. Could you please give us some more details?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
I mean the issue described here:
http://www.teechart.net/support/viewtop ... pect+ratio
http://www.teechart.net/support/viewtop ... pect+ratio
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Danila,
In that case you can do something like this:
Hope this helps!
In that case you can do something like this:
Code: Select all
Option Explicit
Dim XRatio As Double
Private Sub Form_Load()
TChart1.Series(0).FillSampleValues 10
TChart1.Environment.InternalRepaint
XRatio = GetXRatio()
End Sub
Private Function GetXRatio() As Double
GetXRatio = ((TChart1.Axis.Bottom.Maximum - TChart1.Axis.Bottom.Minimum) _
/ (TChart1.Axis.Left.Maximum - TChart1.Axis.Left.Minimum))
End Function
Private Sub TChart1_OnZoom()
Dim CurrentXRatio As Double
CurrentXRatio = GetXRatio()
If (CurrentXRatio <> XRatio) Then
TChart1.Axis.Left.Maximum = (TChart1.Axis.Bottom.Maximum - TChart1.Axis.Bottom.Minimum + _
(TChart1.Axis.Left.Minimum * XRatio)) / XRatio
End If
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |