index | search | no replies | posting guidelines | help login | register
Index » Products » ASP SimpleGraph
search this forum:
:: Do While Populate Graph ::    show all messagesPost a New Message | Post a Reply
May 19 2004, 9:59 AM
 Re: Do While Populate GraphPost a Reply
 whichman

View this author's profile Send this author a private message Visit author's homepage

from: Laurel, MD

The GetGraph function just returns the graph as an HTML text string.
Make sure that you do not add any NULL values in to the graph. I will forward this bug.
However, try this:

<%
  
  If objRS.EOF  Then  
     'no records returned
  Else    
     Do  While Not objRS.EOF  
         Call objGraph.AddRowData(objRS("ProductName") & "",  _  
             ParseDbl(objRS("Weight") & ""))  
        objRS.MoveNext  
     Loop  
     objRS.Close  
      
     With ObjGraph  
          'Add some variables
          objGraph.XScaleValues = "Product"
          objGraph.xALign = "center"
          objGraph.yLabel = "Weight"
          objGraph.Title = "Product Weights"
     End  With  
     objGraph.Draw  
    'or  
    'Response.Write(objGraph.GetGraph)  
  End  If  
  
  Function ParseDbl(ByVal s)  
     If  IsNumeric(s)  Then ParseDbl=CDbl(s)  Else ParseDbl=0  
  End  Function  
  
%>




-------------------------
Master of the Game
Pages: (1)   [1]

search this forum: