
Volume-High-Low-Close chart from VB/VBScript
I am reading data from an ADO recordset and trying to create a
volume-high-low-close chart from it. I have an example chart in excel I am
trying to duplicate. The fact that I can do it within excel leads me to
believe that I should be able to do it from VB or an .asp. Maybe that's not
right. Anyway, I can get the high-low-close chart to display just fine, but
can't add the volume and get it to display right. Does anyone have an
example of this that works? Here's the code I'm using to do what I'm doing
currently:
.SeriesCollection.Add
.SeriesCollection(0).Type = chChartTypeStockHLC
.SeriesCollection(0).SetData chDimCategories, chDataLiteral, aMonths
.SeriesCollection(0).SetData chDimHighValues, chDataLiteral, aHighs
.SeriesCollection(0).SetData chDimLowValues, chDataLiteral, aLows
.SeriesCollection(0).SetData chDimCloseValues, chDataLiteral,
aCloses
It seems like there should be an equivalent chart type enum to xlStockVHLC
called chChartTypeStockVHLC but there isn't. I have tried to add my volume
data to the SeriesCollection using every one of the chDim... constants, and
I get invalid procedure call on all of them. I have tried adding a 2nd
series and setting it's Type to something else and adding my volume data to
that series, but it gets hosed when I change the type because it changes ALL
of the SeriesCollection items' Type settings, hosing my high-low-close
series.
I'm sure there's something very obvious here that I'm just not getting, but
I can't see it. Any help appreciated.
Mark