Page 1 of 1
Hiding Points in a Series
Posted: Fri Nov 12, 2021 1:32 am
by 16692379
Is there a way to hide one or more points in a series. For instance, let's say I have 4 series of 12 points each. Can I have a chart that show only points 1 thru 3 for the 1st series, 4 thru 6 for the 2nd, etc.
If there's a functionality or property that controls this please advise.
Thanks in advance,
Dave
Re: Hiding Points in a Series
Posted: Fri Nov 12, 2021 10:23 am
by yeray
Hello Save,
Yes, you can hide specific points by setting them as "null points". Ie:
Code: Select all
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.Legend.Visible = False
.Panel.Gradient.Visible = False
.Panel.Color = vbWhite
.Walls.Back.Gradient.Visible = False
.Walls.Back.Color = vbWhite
.Axis.Left.GridPen.Visible = False
.Axis.Bottom.GridPen.Visible = False
Dim i, j As Integer
For i = 0 To 3
.AddSeries scPoint
.Series(i).FillSampleValues 12
For j = 0 To .Series(i).Count - 1
If (j < i * 3) Or (j >= (i + 1) * 3) Then
.Series(i).SetNull j
End If
Next j
Next i
End With
- points.png (4.51 KiB) Viewed 33337 times
Re: Hiding Points in a Series
Posted: Sat Nov 13, 2021 2:11 am
by 16692379
Thank you Yeray. That worked perfectly. Much appreciate -- both your explanation and timely reply.
I now know to look at the .SetNull functionality. Before your reply, I was thinking it would be something like a 'hidden' attribute, but now I now that wasn't the way to go.
Best,
Dave L.