<SCRIPT Language="VBScript" RUNAT=Server>
dim TChart1
Set TChart1 = Server.CreateObject("TeeChart.TChart")
TChart1.removeallseries
'设置标题
TChart1.Header.Text.Clear
TChart1.Header.Text.Add ("chart测试")
TChart1.Header.Font.Color=RGB(22,5,120)
'TChart1.Header.Font.Size=2
'赋值
TChart1.AddSeries(1)
TChart1.Series(0).Clear
TChart1.Series(0).Add 100, "Apples", RGB(111,166,196)
TChart1.Series(0).Add 300, "Pears", RGB(101,122,205)
TChart1.Series(0).Add 200, "Bananas", RGB(255,255,0)
' 把图形文件名转化成本地绝对路径表达方式
JpegLocalFile = Server.Mappath( "pic.jpg" )
' 把制定的图形生成、存入本指定文件
TChart1.Export.SaveToJPEGFile JpegLocalFile, False, jpegBestQuality, 100,_
TChart1.Width, TChart1.Height
Response.Write("<img src=pic.jpg>")
</SCRIPT>