Chart <!--Here we are calling the LPK file. This LPK file
is created using the same method explained in the Article-->
<object classid= "clsid:5220cb21-c88d-11cf-b347-00aa00a28331"
Id= "Microsoft_licensed_class_manager_1_0" >
<param name= "LPKPath" value= "MSCHART5.LPK" >
</object>
<--is where we are actually "instantiating"
ActiveX control. I downloaded the file Mschart5.cab from
Microsoft ' s website. It has been digitally signed. -->
<object id= "MSChart1" width=100% height=95%
Classid= "clsid:31291e80-728c-11cf-93d5-0020af99504a"
codebase= "Mschart5.cab" >
</OBJECT>
<script language= "Vbscript" >
' Now, let ' s set the chart properties ...!!!
' This sets the chart-a line graph ...
Mschart1.charttype = 3
' Set ' the color and width of the line
' This sets the pen color to black (0,0,0)
' and width to pixels.
MSChart1.Plot.SeriesCollection (1). Pen.VtColor.Set 0,0,0
MSChart1.Plot.SeriesCollection (1). Pen.Width = 50
' This sets the chart's labels to various formats,
' Fonts, and sizes.
For i = 1 to MSChart1.Plot.Axis (1). Labels.count
' Format the Chart labels to Currency
MSChart1.Plot.Axis (1). Labels (i). Format = "$0,###"
' Set the font to Tahoma
MSChart1.Plot.Axis (1). Labels (i). Vtfont.name = "Tahoma"
' Set the font size to 10pt
MSChart1.Plot.Axis (1). Labels (i). Vtfont.size = 10
Next
' This is sets the # of rows in the chart
Mschart1.rowcount = 5;
' This sets the # of columns per row.
Mschart1.columncount = 2
' This indicates to show the label
Mschart1.showlegend = True
For x = 1 to 5 ' The number of rows we have
' This sets what the current row we are editing
Mschart1.row = X
' This sets the row ' s label
Mschart1.rowlabel = "Row" & X
' This plots the points for both columns (1 and 2)
' For the current row (x). The value being
' Plotted is x*5 and x*10
Call MSChart1.DataGrid.SetData (x, 1, X*5,nullflag)
Call MSChart1.DataGrid.SetData (x, 2, X*10,nullflag)
Next
</script>