Hi again,
That was Part I of the episode for displaying data in Excel sheet, now if you want to display charts, try this one :-
<%@ Language=VBScript %>
<!--#include file="adovbs.inc"-->
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<object id=ChartSpace1 classid=CLSID:0002E500-0000-0000-C000-000000000046 style="width:100%;height:350"></object>
<script language=vbs>
Sub Window_OnLoad()
Dim categories, values
categories="JAN FEB MAR APR MAY JUN"
values="10 20 30 15 100 40"
values2="0 15 10 35 80 30"
values3="5 20 45 35 60 65"
' Create a chart with Multiple series (called "Sales"

.
ChartSpace1.Clear
ChartSpace1.Charts.Add
ChartSpace1.Charts(0).SeriesCollection.Add
ChartSpace1.Charts(0).SeriesCollection(0).Caption = "Sales1"
ChartSpace1.Charts(0).SeriesCollection.Add
ChartSpace1.Charts(0).SeriesCollection(1).Caption = "Sales2"
ChartSpace1.Charts(0).SeriesCollection.Add
ChartSpace1.Charts(0).SeriesCollection(2).Caption = "Sales3"
'Set the series categories and values using the strings created above as static currently but can be made dynamically (values, values2,values3).
Set c = ChartSpace1.Constants
ChartSpace1.Charts(0).SeriesCollection(0).SetData c.chDimCategories, c.chDataLiteral, categories
ChartSpace1.Charts(0).SeriesCollection(0).SetData c.chDimValues, c.chDataLiteral, values
ChartSpace1.Charts(0).SeriesCollection(1).SetData c.chDimValues, c.chDataLiteral, values2
ChartSpace1.Charts(0).SeriesCollection(2).SetData c.chDimValues, c.chDataLiteral, values3
' Set the chart type
ChartSpace1.Charts(0).Type = c.chChartTypeLineMarkers'chChartTypeBarClustered
ChartSpace1.Charts(0).HasLegend = True
ChartSpace1.Charts(0).Legend.Position = chLegendPositionBottom
ChartSpace1.HasChartSpaceTitle = True
ChartSpace1.ChartSpaceTitle.Caption = "Monthly Sales Analysis"
ChartSpace1.Charts(0).Axes(c.chAxisPositionBottom).hastitle=true
ChartSpace1.Charts(0).Axes(c.chAxisPositionBottom).title.caption="Months"
ChartSpace1.Charts(0).Axes(c.chAxisPositionLeft).hastitle=true
ChartSpace1.Charts(0).Axes(c.chAxisPositionLeft).title.caption="Sales"
ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection.Add
ChartSpace1.Charts(0).SeriesCollection(1).DataLabelsCollection.Add
ChartSpace1.Charts(0).SeriesCollection(2).DataLabelsCollection.Add
End Sub
</script>
</BODY>
</HTML>
Please note, in the above example I am showing a Line chart and the data is static. You can also make charts against dynamic data (fetch data from database and simply specify in "values" say something like values= "<%=value_from_database%>" but don't forget to put a tab space between the data values.
hope this helps you,
Regards,
Vikas