Hi,
I am trying to set a threshold value for Y and if Y exceeds the threshold, the data should be added in red color. Otherwise, add data in green color. How to realize it for FastLine series?
Thank you very much!
David
How to change color in FastLine series
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi David,
This can not be done using a fast line series. Fast line only supports a unique color. However, you can do it by using a line series and something like this:
This can not be done using a fast line series. Fast line only supports a unique color. However, you can do it by using a line series and something like this:
Code: Select all
Private Sub Form_Load()
Dim val, threshold As Double
threshold = 0.8
With TChart1.Series(0)
.ColorEachPoint = True
For i = 0 To 100
val = Rnd
If val > threshold Then
.Add Rnd, "", vbRed
Else
.Add Rnd, "", vbGreen
End If
Next
End With
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 |