This example uses 2 files:
Client: TeeFromWebClient.asp
*************************************************************************
<%
ServerPath=Request.Servervariables("LOCAL_ADDR")
%>
<html>
<META HTTP-EQUIV="Expires" CONTENT="0">
<script LANGUAGE="VBScript">
sub window_onload()
TeeCommander1.ChartLink = TChart1.ChartLink
TChart1.Import.LoadFromURL("http://<%=ServerPath%>/TeeChart8/TeeFromWeb.asp")
end sub
Sub TChart1_OnDblClick()
TChart1.ShowEditor
TChart1.StopMouse
end sub
Sub TChart1_OnMouseMove(Shift, X,Y)
' Example use of Chart event
' Uncomment code to see Mouseover message
' dim tmp
' tmp = TChart1.Series(0).Clicked(X,Y)
' if tmp <> -1 then
' if TChart1.Series(0).YValues.Value(tmp)=TChart1.Series(0).YValues.Maximum then
' msgbox("Max Y Value =" & TChart1.Series(0).YValues.Value(tmp) )
' end if
' end if
end sub
</script>
<head>
<title>TeeChart v8 Stream to browser example</title>
<LINK REL=STYLESHEET TYPE="text/css" HREF="Style.css"></HEAD><BODY>
<img src="TeeChartAX300x66.jpg">
<br><br>
<a href="ASPHome.htm">メインへ戻る</a>
<hr>
<p>This example page calls a serverside script to create a Chart and return the
result to the browser Chart as a native TeeChart template. The browser Chart imports
the template (inclusion of data is optional). No temporary files are used, output is
streamed directly to the browser. In this way TeeChart could alternatively stream all
supported output image formats (eg. JPEG, PNG, GIF, Metafile) to the browser.</p>
<hr>
<p>
<object ID="TeeCommander1" WIDTH="600" HEIGHT="32" align="center"
CLASSID="clsid:DCAB77D9-709F-4BB0-92B9-5CFE7A5170EB">
</object>
</p>
<p>
<object ID="TChart1" WIDTH="600" HEIGHT="400" align="center"
CLASSID="clsid:BDEB0088-66F9-4A55-ABD2-0BF8DEEC1196">
</object>
</p>
<HR>Copyright © 2008 NEWTONE Corporation</BODY>
</html>
*************************************************************************
Server: TeeFromWeb.asp
*************************************************************************
<!--METADATA NAME="TeeChart Pro v8 ActiveX Control" TYPE="TypeLib" UUID="{EB7A6012-79A9-4A1A-91AF-F2A92FCA3406}"-->
<%
' Meta data section above to permit use of TeeChart constants in script
Dim i
Dim x
Response.Buffer=true
Set Chart1 = CreateObject("TeeChart.TChart")
Chart1.Header.Text(0)="Performance"
Chart1.AddSeries(scBar)
Chart1.Aspect.View3D=False
Chart1.Panel.Gradient.Visible=True
Chart1.Panel.BevelOuter=2
Chart1.Panel.BevelWidth=2
Chart1.Axis.Bottom.Labels.Angle=90
'use your methods eg via DB to populate Chart or...
x=Now*10000
For i = 0 to 5
Chart1.Series(0).AddXY x, Rnd*x,"",clTeeColor
x=x+100
Next
Response.BinaryWrite (Chart1.Export.asNative.SaveToStream(True))
%>
*************************************************************************