Hello,
The graph is setup to follow the 1-2-5 rule across 20 horizontal lines for the Y-Axis of the grid during normal view.
My customer is requesting that the number of horizontal grid lines remain constant (20 Lines) while in Zoomimg or Panning.
How can I do this?
Thanks
Setting Number of Horizontal Grid Lines While Zooming
Re: Setting Number of Horizontal Grid Lines While Zooming
Hello,
What about setting a Left Axis Increment each time the chart is zoomed/unzoomed?
Ie:
What about setting a Left Axis Increment each time the chart is zoomed/unzoomed?
Ie:
Code: Select all
Dim nGridLines As Integer
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scLine
With TChart1.Series(0)
.FillSampleValues
End With
nGridLines = 20
TChart1.Environment.InternalRepaint
recalcIncrement
End Sub
Private Sub TChart1_OnUndoZoom()
recalcIncrement
End Sub
Private Sub TChart1_OnZoom()
recalcIncrement
End Sub
Private Sub recalcIncrement()
With TChart1.Axis.Left
.Increment = (.Maximum - .Minimum) / nGridLines
End With
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Setting Number of Horizontal Grid Lines While Zooming
Yeray,
Thanks for the info.
That got me started in the right direction.
I also had to set the min.Separation % to 0 to keep the 20 lines from disappearing if the graph height is set to short.
I modified the code to cover both left and right axis.
Thanks for the info.
That got me started in the right direction.
I also had to set the min.Separation % to 0 to keep the 20 lines from disappearing if the graph height is set to short.
I modified the code to cover both left and right axis.