I'm trying to draw a graph that climbs for the first half, and descends for the second.
This code climbs just fine, but when I try to descend, it doesn't show anything.
If I change the MinusData = MinusData - 1
code to MinusData = MinusData + 1, it keeps climbing.
The numbers are actually descending from 65 to 1, but the chart doesn't follow.
What am I missing?
Dim arr(1 To 126, 1 To 7) ' 125 rows, 7 lines - 1 flow, 3-2pair windows
Dim PlusData As Integer 'test data - move data positive
Dim MinusData As Integer
PlusData = 1
MinusData = 66
Dim DataPoints(1 To 126, 1 To 1) 'total number of data points
'this is the up plus data
For PlusPoints = 1 To 65 '1st half of the datapoints going up
DataPoints(PlusData, 1) = PlusData
PlusData = PlusData + 1
Next PlusPoints
'this is the down minus data
For MinusPoints = 66 To 124 '2nd half of the datapoints going down
DataPoints(MinusData, 1) = MinusData
MinusData = MinusData - 1
Debug.Print MinusData
Debug.Print DataPoints(MinusData, 1)
Next MinusPoints
Thanks,
Gary
This code climbs just fine, but when I try to descend, it doesn't show anything.
If I change the MinusData = MinusData - 1
code to MinusData = MinusData + 1, it keeps climbing.
The numbers are actually descending from 65 to 1, but the chart doesn't follow.
What am I missing?
Dim arr(1 To 126, 1 To 7) ' 125 rows, 7 lines - 1 flow, 3-2pair windows
Dim PlusData As Integer 'test data - move data positive
Dim MinusData As Integer
PlusData = 1
MinusData = 66
Dim DataPoints(1 To 126, 1 To 1) 'total number of data points
'this is the up plus data
For PlusPoints = 1 To 65 '1st half of the datapoints going up
DataPoints(PlusData, 1) = PlusData
PlusData = PlusData + 1
Next PlusPoints
'this is the down minus data
For MinusPoints = 66 To 124 '2nd half of the datapoints going down
DataPoints(MinusData, 1) = MinusData
MinusData = MinusData - 1
Debug.Print MinusData
Debug.Print DataPoints(MinusData, 1)
Next MinusPoints
Thanks,
Gary