Am wanting to add a candle series, and a volume series. Can add either series on their own, but when try to do both at same time the candlesticks all appear in one single column on the Right hand side.
In the example below try using either the example data for candle or volume and it is fine. But try using both and chart does not align the x axis points but stacks all candles in one vertical bar, and all volume line(bars) ina vertical pile.
Code: Select all
'Candle series
pgChart1.AddSeries(11) '11 = scCandle
pgChart1.Series(0).VerticalAxis = 0 'aLeftAxis '0
pgChart1.Axis.Left.StartPosition = 0
pgChart1.Axis.Left.EndPosition = 60 'percentage
pgChart1.Axis.Left.Labels.ValueFormat = svbFormat
'Volume series
pgChart1.AddSeries(14) '14 = scVolume
pgChart1.Series(1).asVolume.UseYOrigin = False
pgChart1.Series(1).VerticalAxisCustom = pgChart1.Axis.AddCustom(False)
pgChart1.Axis.Custom(0).StartPosition = 60
pgChart1.Axis.Custom(0).EndPosition = 100
pgChart1.Axis.Custom(0).Title.Caption = "Volume"
pgChart1.Axis.Custom(0).Title.Angle = 90
'Example Volume values
pgChart1.Series(1).AddXY 0, 20,"", vbBlue
pgChart1.Series(1).AddXY 1, 10,"", vbBlue
pgChart1.Series(1).AddXY 2, 30,"", vbBlue
'Example OHLC candle values
pgChart1.Series(0).asCandle.AddCandle DateValue("1997-11-02"), 120, 135, 112, 115
pgChart1.Series(0).asCandle.AddCandle DateValue("1997-11-03"), 215, 224, 202, 221
pgChart1.Series(0).asCandle.AddCandle DateValue("1997-11-04"), 235, 244, 232, 241
Thanks
p.s. The documentation is shockingly poor. Doing a function reference dump is not adequate addition to the *tutorial*. Docs need alot of work.