|
|
<%
dim myobj
Set myobj = server.CreateObject("PEGOD.Pegodctrl.1")
myobj.MainTitle = "Hello Internet"
myobj.SubTitle = ""
myobj.PrepareImages = True
myobj.Subsets = 4
myobj.Points = 12
dim i
dim j
for i = 0 to 3
for
j = 0 to 11
myobj.YData(i,j)
= 5 + Rnd(20)
next
next
Response.BinaryWrite (myobj.PNGToStream(300,300))
Set myobj = Nothing
%> |
|
Using NotePad, create another file called "MyFirst.asp" and enter the
corresponding code shown to the left.
Again, save this
file into your web server's local root directory as you did with
"MyFirst.htm".
Note the entire
contents of "MyFirst.asp" are within
<% ... %> tags.
"MyFirst.asp" contains ASP code
(VBScript) which creates a ProEssentials component via the CreateObject
method. CreateObject's only argument is a ClassID.
In this case, PEGOD.Pegodctrl.1 is the ClassID for the ProEssentials Graph
Object. Note, Standard users use PEGODSTD.PegodStdCtrl.1
and Lite users use PEGODLITE.PegodLiteCtrl.1
Next, the code sets the control's MainTitle and SubTitle properties.
Next, Subsets and Points
properties are set and define the amount of data the control will contain.
Then,
a nested for-next loop passes 48 random data points into the YData(s,p) two dimensional property array.
Next, FontSize is set to 0 which denotes
large font. You will likely use our ProEssentials ASP
Include file and then prototype your ASP code within Visual Basic.
This lets you copy and paste your Visual Basic code directly into an ASP
page because the include file holds the declarations for property enumerations.
|