trouble drawing a shape
Posted: Sat Jun 11, 2005 7:28 pm
I want to draw a rectangle on my chart. I set up a rectangular shape series with the editor.
I did a small test program and it seems Ok but in my production prog I get a method error on the .asShape.X0 statement.
I'm using VB6 and Tchart 6.
The only thing I see that appears different in the code is the production prog uses series 21, test uses 0. Is this an issue?
Anyhow, maybe someone can tell me where to look.
Test orig:
This appears to work.
The production prog:
This gives a method error on the first .asShape statement
The other series not shown are either candlesticks or line series.
Any help would be appreciated.
David
I did a small test program and it seems Ok but in my production prog I get a method error on the .asShape.X0 statement.
I'm using VB6 and Tchart 6.
The only thing I see that appears different in the code is the production prog uses series 21, test uses 0. Is this an issue?
Anyhow, maybe someone can tell me where to look.
Test orig:
Code: Select all
Dim adjptrend As Double
Dim threeperY0 As Double
Dim threeperY1 As Double
adjptrend = 90
threeperY0 = 684.5
threeperY1 = 687.9
With TChart1.Series(0)
.asShape.X0 = adjptrend - 3
.asShape.X1 = adjptrend - 1
.asShape.Y0 = threeperY0
.asShape.Y1 = threeperY1
End With
The production prog:
Code: Select all
' these are dimensioned as doubles elsewhere
adjPtrEnd = 90
threePerY0 = 684.5
threePerY1 = 687.9
' i forced these 3 values to match the data for testing purposes
'
With MultiChart.Series(21)
.XValues.DateTime = False
.asShape.X0 = adjPtrEnd - 3
.asShape.X1 = adjPtrEnd - 1
.asShape.Y0 = threePerY0
.asShape.Y1 = threePerY1
End With
The other series not shown are either candlesticks or line series.
Any help would be appreciated.
David