index | search | no replies | posting guidelines | help | login | register |
Index » Products » ASP SimpleGraph |
| |||||||
May 19 2004, 8:53 AM |
| ||||||
Latitude7ds from: somewhere | When using variables like the comented line under add data I get an error stating object reference not set. Use 'GetGraph'. I have tried various methods to induce variables into the Call. It seems to only accept static text like the un-comented line under add data. <% If Not Subrst.EOF and Not Subrst.BOF Then Subrst.movefirst Do While Not Subrst.EOF 'Add data 'Call objGraph.AddRowData(Subrst("ProductName"),Subrst("Weight")) Call objGraph.AddRowData("Kevin Garnett","35,40") Subrst.movenext Loop With ObjGraph 'Add some variables objGraph.XScaleValues = "Product" objGraph.xALign = "center" objGraph.yLabel = "Weight" objGraph.Title = "Product Weights" End With objGraph.Draw End If %> Also: your links in SimpleGraph Object Referance do not work. | ||||||
May 19 2004, 9:59 AM |
| ||||||
whichman 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] |