<HTML>
<%
dim filePath
dim httpPath
dim outputTeefile
dim outputJpegfile
' where server filepath locates to the same as URL below
filePath = "d:\data\WebTestFiles\"
httpPath = "http://128.0.0.55/testfiles/"
outputTeefile = "Chart" & Session.Sessionid & Replace(Time, ".", "") &
".tee"
outputJpegfile = "Chart" & Session.Sessionid & Replace(Time, ".", "") &
".jpg"
Set Chart1 = CreateObject("TeeChart.TChart")
Chart1.AddSeries(1)
Chart1.Aspect.View3D=False
'use your methods eg via DB to populate Chart or...
Chart1.Series(0).FillSampleValues 20
Chart1.Export.SaveToFile filepath & outputTeefile
Chart1.Export.SaveToJPEGFile filepath & outputJpegfile, False,
jpegBestQuality, 100, 450, 290
%>
<HEAD></HEAD><BODY>
<p>In the client section of the page you can display JPEG or Live
Charts.</p>
<SCRIPT LANGUAGE=VBSCRIPT>
Sub FillChart()
TChart1.Import.LoadFromURL("<%=httpPath%><%=outputTeefile %>")
End Sub
Sub TChart1_OnAfterDraw()
TChart1.Canvas.Font.Color = RGB(240,240,50)
TChart1.Canvas.Font.Bold=True
If TChart1.SeriesCount > 0 then
If TChart1.Series(0).Count > 0 then
TChart1.Canvas.TextOut TChart1.Axis.Left.Position, _
TChart1.Axis.Top.Position - 18, _
"Max point: " & TChart1.Series(0).YValues.Maximum
End if
End if
end sub
</SCRIPT>
<p>Here loading the Chart with a button (or could use IE Window_Onload
event):</p>
<p><input type="button" value="Populate Chart" onclick="FillChart"
name="cdmChart1"></p>
<OBJECT ID="TChart1" WIDTH=450 HEIGHT=290
CLASSID="CLSID:008BBE7E-C096-11D0-B4E3-00A0C901D681">
</OBJECT>
<IMG SRC=<%=httpPath%><%=outputJpegfile%>> </A>
</BODY></HTML>