Wheel zoom
Wheel zoom
Hi,
I would like to zoom with the mouse wheel (I don't want to push the wheel button but when I use the wheel I want the chart
- to zoom in near the latest data with the first wheel way
- to zoom out with the other wheel way
How can I do this with Teechart v8 ?
Thanks a lot for your help
Guilz
I would like to zoom with the mouse wheel (I don't want to push the wheel button but when I use the wheel I want the chart
- to zoom in near the latest data with the first wheel way
- to zoom out with the other wheel way
How can I do this with Teechart v8 ?
Thanks a lot for your help
Guilz
Re: Wheel zoom
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Wheel zoom
Hi Yeray,
Thank you for your code but I think you need to add this instruction
but now I don't know how to use it to do what I would like to do : when I will use the wheel, I would like my chart zoom in on the right part of the graph and when I use the wheel in the other way, the chart zoom out
How can I do this in my code bellow ?
Thank you very much for your help
Guilz
Thank you for your code but I think you need to add this instruction
Code: Select all
AxTChart1.Environment.MouseWheelScroll = False
How can I do this in my code bellow ?
Thank you very much for your help
Guilz
Code: Select all
Public Class Form1
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
AxTChart1.Environment.MouseWheelScroll = False
AxTChart1.Aspect.View3D = False
InitializeChart()
End Sub
Private Sub InitializeChart()
axTChart1.Aspect.View3D = False
axTChart1.AddSeries(TeeChart.ESeriesClass.scFastLine)
AxTChart1.Series(0).FillSampleValues(300)
AddHandler Me.MouseWheel, AddressOf Form1_MouseWheel
End Sub
Private Sub Form1_MouseWheel(ByVal sender As Object, ByVal e As MouseEventArgs)
axTChart1.Header.Caption = "mousewheel event"
Dim rect As New Rectangle(axTChart1.Location.X, axTChart1.Location.Y, axTChart1.ChartBounds.Right - axTChart1.ChartBounds.Left, axTChart1.ChartBounds.Bottom - axTChart1.ChartBounds.Top)
If rect.Contains(e.X, e.Y) Then
axTChart1.Header.Caption = axTChart1.Header.Caption + " in chart"
End If
End Sub
End Class
Re: Wheel zoom
Details: using wheel mouse zoom in:
Re: Wheel zoom
Hello guilz2010,
I have made a simple code, I think this can help you to achieve as you want:
Could you confirm us, if previous code works as you expected?
Thanks,
I have made a simple code, I think this can help you to achieve as you want:
Code: Select all
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
AxTChart1.Environment.MouseWheelScroll = False
AxTChart1.Aspect.View3D = False
InitializeChart()
End Sub
Private Sub InitializeChart()
AxTChart1.Aspect.View3D = False
AxTChart1.AddSeries(TeeChart.ESeriesClass.scFastLine)
AxTChart1.Series(0).FillSampleValues(300)
AddHandler Me.MouseWheel, AddressOf Form1_MouseWheel
End Sub
Private Sub Form1_MouseWheel(ByVal sender As Object, ByVal e As MouseEventArgs)
If e.Delta > 0 Then
AxTChart1.Axis.Bottom.SetMinMax(AxTChart1.Axis.Bottom.CalcPosPoint(AxTChart1.Axis.Bottom.IEndPos - 100), AxTChart1.Axis.Bottom.Maximum)
Else
AxTChart1.Axis.Bottom.Automatic = True
End If
End Sub
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: Wheel zoom
Hi Sandra,
Thank you for your code - The zoom in code works well but I would like to have the same function to zoom out (here you make a full zoom out - AxTChart1.Axis.Bottom.Automatic = True)
How can we come back to the previous zoom state when we zoom out, without returning directly to the initial chart range (progressively like the zoom in) ?
Kind regards,
Guilz
Thank you for your code - The zoom in code works well but I would like to have the same function to zoom out (here you make a full zoom out - AxTChart1.Axis.Bottom.Automatic = True)
How can we come back to the previous zoom state when we zoom out, without returning directly to the initial chart range (progressively like the zoom in) ?
Kind regards,
Guilz
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Wheel zoom
Hi Guilz,
Yes, you can do that enabling Zoom.History property, for example:
Yes, you can do that enabling Zoom.History property, for example:
Code: Select all
TChart1.Zoom.History = True
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 |
Re: Wheel zoom
Hi Narcis,
Unfortunaly, this property is not available in Teechart v8, the version we use
Guilz
Unfortunaly, this property is not available in Teechart v8, the version we use
Guilz
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Wheel zoom
Hi Guilz,
In that case you have two options:
1. Upgrade to TeeChart 2010 ActiveX.
2. Implement the feature yourself recording axes min. and max. values for each zoom level and revert them back when unzooming.
In that case you have two options:
1. Upgrade to TeeChart 2010 ActiveX.
2. Implement the feature yourself recording axes min. and max. values for each zoom level and revert them back when unzooming.
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 |
Re: Wheel zoom
1 - We are waiting for bugs fixed since months on v10 version. Steema support says please read Feed RSS or Facebook or ... but NOTHING is coming...the upgrade version is a shame on this product And do not ask me the list of bugs I waiting for -> I already post it, please use search engine !
2 - Thank you very much - In the future, If I ask something to support I must before remember to do it myself
Guilz
2 - Thank you very much - In the future, If I ask something to support I must before remember to do it myself
Guilz
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Wheel zoom
Hi Guilz,
TV52014461: Not a bug but a feature request. Not implemented yet.
TV52015105: Not a bug but a feature request. Not implemented yet.
TV52015259: Not a bug but a feature request. Not implemented yet.
TA05015311: Fixed for next TeeChart 2010 ActiveX maintenance release.
TA05015119: Open.
TV52015326: Not a bug but a feature request. Not implemented yet. Actually no datasources are exported with TeeChart. Imagine the case where a database connection is exported in a *.tee file and then this is loaded in a computer without that connection, it would crash. Datasources need to be assigned manually after importing charts.
TV52015179: Fixed in last TeeChart 2010 ActiveX maintenance release as you can see at the version info page.
TV52015427: Fixed for next TeeChart 2010 ActiveX maintenance release.
Ok, I found the list. I checked what Sandra posted in this thread and I'm updating each issue status:1 - We are waiting for bugs fixed since months on v10 version. Steema support says please read Feed RSS or Facebook or ... but NOTHING is coming...the upgrade version is a shame on this product And do not ask me the list of bugs I waiting for -> I already post it, please use search engine !
TV52014461: Not a bug but a feature request. Not implemented yet.
TV52015105: Not a bug but a feature request. Not implemented yet.
TV52015259: Not a bug but a feature request. Not implemented yet.
TA05015311: Fixed for next TeeChart 2010 ActiveX maintenance release.
TA05015119: Open.
TV52015326: Not a bug but a feature request. Not implemented yet. Actually no datasources are exported with TeeChart. Imagine the case where a database connection is exported in a *.tee file and then this is loaded in a computer without that connection, it would crash. Datasources need to be assigned manually after importing charts.
TV52015179: Fixed in last TeeChart 2010 ActiveX maintenance release as you can see at the version info page.
TV52015427: Fixed for next TeeChart 2010 ActiveX maintenance release.
I'd like to apologise if that's the impression you got from my reply but that was not my intention. Steema technical support mission is assisting Steema customers with TeeChart usage. I gave you a brief idea on how to implement the feature you requested and which is already implemented in current TeeChart version. Regarding your inquiry I'd recommend you to use arrays/structs to store left and bottom axes minimum and maximum properties after zoom is performed using the OnZoom event. When UndoZoom event is fired you should check if there are values on those structures and if that's the case assign last values set to chart axes and remove those values. If you come across any problem implementing this let us know and we will try to help you solving it.2 - Thank you very much - In the future, If I ask something to support I must before remember to do it myself
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 |
Re: Wheel zoom
My apologies Narcis for my answer too but we are frustated about the long 'next release period' - No worries for the feature requests but for the bugs it's too long to wait...
We use Teechart v8 every day in our developments, we buy license for v10 version but we don't use it until bugs are not fixed.
Thank you for the point 2 - We will try to implement this.
Regards,
Guilz
We use Teechart v8 every day in our developments, we buy license for v10 version but we don't use it until bugs are not fixed.
Thank you for the point 2 - We will try to implement this.
Regards,
Guilz
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Wheel zoom
Hi Guilz,
Ok, no problem. Now you can see that all bugs you reported except for TA05015119 should be fixed in next TeeChart 2010 ActiveX maintenance release due out before the end of July. In that bug list you said that TV52015179 was the most critical issue for you. This should be already fixed in current v2010 release, this would be an improvement from v8 already.My apologies Narcis for my answer too but we are frustated about the long 'next release period' - No worries for the feature requests but for the bugs it's too long to wait...
We use Teechart v8 every day in our developments, we buy license for v10 version but we don't use it until bugs are not fixed.
For completeness with Sandra's example, you could also check if e.Delta is negative for unzooming, contrary to what you do for zooming when e.Delta is positive.Thank you for the point 2 - We will try to implement this.
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 |