Hello,
Is there a way to 'flash' a point on a chart when it doesn't meet specifications OR when it is the last point on the chart?
For example, If a point exceeds certain constraints, I would like to blink that point between blue and black to give the operator more of a quick visibility to errors.
Thanks!
Andrew
Flashing a single point on a chart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Andrew,
Yes, you could do somethink like:
Yes, you could do somethink like:
Code: Select all
Dim UT, LT, M, D, Current As Double
Private Sub Form_Load()
TChart1.Series(0).FillSampleValues 25
M = TChart1.Series(0).YValues.Total / TChart1.Series(0).Count
D = (TChart1.Series(0).YValues.Maximum - TChart1.Series(0).YValues.Minimum) / 4
UT = M + D
LT = M - D
End Sub
Private Sub Timer1_Timer()
Blink_Points
End Sub
Private Sub Blink_Points()
For i = 0 To TChart1.Series(0).Count - 1
Current = TChart1.Series(0).YValues.Value(i)
If ((Current > UT) Or (Current < LT) Or (i = TChart1.Series(0).LastValueIndex)) Then
If TChart1.Series(0).PointColor(i) = vbBlue Then
TChart1.Series(0).PointColor(i) = vbYellow
Else
TChart1.Series(0).PointColor(i) = vbBlue
End If
End If
Next
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 |