I have a chart in which I want only 10 values and the point color should fade out from red. Currently it looks like this:
Code: Select all
chtOptimalTrim.Series(0).AddXY rValue, rYValue, "", vbRed
If chtOptimalTrim.Series(0).Count < 10 Then
icnt = chtOptimalTrim.Series(0).Count
For i = 1 To icnt
chtOptimalTrim.Series(0).PointColor(i) = RGB((i + 10 - icnt) * 25, 0, 0)
Next
Else
For i = 1 To 10
chtOptimalTrim.Series(0).PointColor(i) = RGB(i * 25, 0, 0)
Next
End If
Do While chtOptimalTrim.Series(0).Count > 10
chtOptimalTrim.Series(0).Delete 0
Loop
Ideas anyone?
Is there a difference in the chart type? (XY or line, I'm using a line)
TIA
/Kejpa