i created one stackColumn Chart which supposed to have nine item showing in the legend( For Item A to Item I) but it just show 8 item (Item A to Item H) and one Series9, i try to check this for few day but still cannot found the problem
strSQL = "select columnA, columnB from Table Column "
rsMFg.Open strSQL, cntdb
if not rsMfg.EOF then
'''''''''''''''''''''''''''''''''''''''''''''''''''''
' set graph object here
set oChart = createObject("OWC.Chart")
set c = oChart.Constants
oChart.Clear
oChart.Border.color = c.chColorNone
' Add a chart and set parameters for the chart
oChart.Charts.Add
dim jser ' for series usega
jser = 0
x = 0
'''''''''''''''''''''''''''''''''''''''''''''''''''''
do while not rsMfg.EOF
IF rsMfg("ColumnB")<> "" THEN
Short = rsMfg("ColumnA")
END IF
strSQL1 = "Select * from XXX"
rsMfg1.Open strSQL1, cntDB
if not rsMfg1.EOF then
do while not rsMfg1.EOF
yQty(x) = cdbl(rsMfg1("DDD")
X = X + 1
loop
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' set graph Operation value here
oChart.Charts(0).SeriesCollection.Add
set jSeries = oChart.Charts(0).SeriesCollection(jser)
jSeries.Type = c.chChartTypeColumnStacked
jSeries.Caption = Short
jSeries.SetData c.chDimCategories, c.chDataLiteral, xDay
jSeries.SetData c.chDimValues, c.chDataLiteral, yQty
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
end if
rsMfg1.Close
rsMfg.MoveNext
loop
End if
Column table is the source to for display those item in the legend. I have to try to response.write it and it is ok, it show all 9 item.
as you are still stuck on this, can you post as sample worksheet with this problem, but as we don't have the same data to create your chart it is difficult to see the problem
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete