Using ActiveX TeeChart 5.
Seems like grid lines on aplot are interlocked with axis label text so that it is impossible to hide the labels and still see the grid lines. There are examples on the web indicating that setting
.axis.left.Labels.Style = talNone
should just hide the labels, but it also hides major and minor grid lines, just like
.axis.left.labels.visible = False
does.
Setting the label to "" in OnGetAxisLabel hides the labels, but keeps all spacing that the labels would have used. Same effect as setting the label text font color to match the panel background.
Can anyone help? I'm trying to implement an ecg plot that needs a standard looking grid, but labels are pretty meaningless.
Hide label text but show grid lines
Hi Raymond,
one way could be setting font size to 1 :
one way could be setting font size to 1 :
Code: Select all
Private Sub Command1_Click()
With TChart1.Axis.Bottom
.Labels.Font.Size = 1
.TickLength = 0
.TickInnerLength = 0
End With
End Sub
Private Sub TChart1_OnGetAxisLabel(ByVal Axis As Long, ByVal SeriesIndex As Long, ByVal ValueIndex As Long, LabelText As String)
If Axis = 3 Then
LabelText = " "
End If
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com