Results 1 to 6 of 6

Thread: OWC StackColumn Chart

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    OWC StackColumn Chart

    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
    Attached Images Attached Images  

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    Re: OWC StackColumn Chart

    Here is my source code for create this graph

    Code:
                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.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    Re: OWC StackColumn Chart

    anyone can help me??

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    Re: OWC StackColumn Chart

    need helping from u all.......I have try for the whole week, i still cant found where is the problem....

  5. #5
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: OWC StackColumn Chart

    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

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    Re: OWC StackColumn Chart

    Here is the sample data for the Table Column


    Column A Column B Column C
    ======== ======== ========
    EFG 10 Cutting
    EFG 20 #999
    EFG 30 XXXX
    EFG 40 JJJJJ
    EFG 50 FFFF
    EFG 60 KKKK
    EFG 70 IIII
    EFG 80 AAA
    EFG 90 hhhh


    I have try do in Excel, is it ok. But come to asp, it happen this problem. I attach with the source code
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width