This example uses 2 files: Client: ChartTypesJava.htm ************************************************************************* <HTML> <HEAD><TITLE>系列型の設定 - JScriptバージョン</TITLE> <LINK REL=STYLESHEET TYPE="text/css" HREF="Style.css"></HEAD><BODY onload="SetLoad()"> <img src="TeeChartAX300x66.jpg"> <br><br> <a href="ASPHome.htm">メインへ戻る</a> <hr> <p><FONT face=Verdana size=-1></p> <h2>Form Combo to set TeeChart ASP output</h2> <h3>Output as PNG to IFrame</h3> <p><FONT face=Verdana size=-1>This is a duplicate of the previous ChartTypes example, here JScripted. Select a Chart type from the list to see an example created serverside and exported to your browser as a PNG image. There are 40 Series types in this demo that may be viewed in 2D or 3D. TeeChart supports almost unlimited combinations of differing Series types on one Chart.</p> <SCRIPT LANGUAGE= JAVASCRIPT> function SetChart(){FR1.location='ChartTypesJava.asp?ChartType=' + Form1.Target1.options(document.Form1.Target1.selectedIndex).value + '&View= ' + Form1.Target2.options(document.Form1.Target2.selectedIndex).value; } function SetLoad(){FR1.location='ChartTypesJava.asp?ChartType=' + Form1.Target1.options(0).value + '&View=' + Form1.Target2.options(0).value; } </SCRIPT> <FORM NAME="Form1" ACTION=""> <SELECT NAME="Target1" language="JavaScript" onchange="SetChart()"> <OPTION SELECTED VALUE="0">Line</option> <OPTION VALUE="1">Bar</option> <OPTION VALUE="2">HorizBar</option> <OPTION VALUE="3">Area</option> <OPTION VALUE="4">Point</option> <OPTION VALUE="5">Pie</option> <OPTION VALUE="6">FastLine</option> <OPTION VALUE="7">Shape</option> <OPTION VALUE="8">Gantt</option> <OPTION VALUE="9">Bubble</option> <OPTION VALUE="10">Arrow</option> <OPTION VALUE="11">Candle</option> <OPTION VALUE="12">Polar</option> <OPTION VALUE="13">Surface</option> <OPTION VALUE="14">Volume</option> <OPTION VALUE="15">ErrorBar</option> <OPTION VALUE="16">Bezier</option> <OPTION VALUE="17">Contour</option> <OPTION VALUE="18">Error</option> <OPTION VALUE="19">Point3D</option> <OPTION VALUE="20">Radar</option> <OPTION VALUE="21">Clock</option> <OPTION VALUE="22">WindRose</option> <OPTION VALUE="23">Bar3D</option> <OPTION VALUE="24">ImageBar</option> <OPTION VALUE="25">Donut</option> <OPTION VALUE="26">TriSurface</option> <OPTION VALUE="27">Box</option> <OPTION VALUE="28">HorizBox</option> <OPTION VALUE="29">Histogram</option> <OPTION VALUE="30">ColorGrid</option> <OPTION VALUE="31">BarJoin</option> <OPTION VALUE="32">HighLow</option> <OPTION VALUE="33">Waterfall</option> <OPTION VALUE="34">Smith</option> <OPTION VALUE="35">Pyramid</option> <OPTION VALUE="36">Map</option> <OPTION VALUE="37">HorizLine</option> <OPTION VALUE="38">Funnel</option> <OPTION VALUE="39">Calendar</option> </SELECT> <SELECT NAME="Target2" language="VBScript" onchange="SetChart()"> <OPTION SELECTED VALUE="0">2D</option> <OPTION VALUE="1">3D</option> </SELECT> </FORM> <div id="Framebox"><IFRAME ID=FR1 WIDTH=465 HEIGHT=310 FRAMEBORDER=0 SCROLLING=NO></IFRAME></div> <HR>Copyright © 2008 NEWTONE Corporation</BODY></HTML> ************************************************************************* Server: ChartTypesJava.asp ************************************************************************* <!--METADATA NAME="TeeChart Pro v8 ActiveX Control" TYPE="TypeLib" UUID="{EB7A6012-79A9-4A1A-91AF-F2A92FCA3406}"--> <%@ LANGUAGE="JavaScript" %> <% //*************************************************************** // JScripted version of ChartTypes.asp. The syntax almost identical // to the VBScripted version //*************************************************************** var ChartType var OutputStream var ViewType //=== Create Chart ====== var Chart1 = Server.CreateObject('TeeChart.TChart'); //=== Extract Chart type ======= ChartType=Request.QueryString('ChartType'); ViewType=Request.QueryString('View'); //=== Add Series ========== Chart1.AddSeries(ChartType); //=== Setup Chart view ===== Chart1.Aspect.View3D=ViewType; //=== Do Chart bits and pieces ===== Chart1.Header.Text(0)='TeeChart Series Types'; Chart1.Walls.Left.Transparent=true; Chart1.Panel.Gradient.Visible=true; Chart1.Panel.Gradient.StartColor=0xB3DEF5; Chart1.Panel.Gradient.EndColor=0xFACE87; //==== Size will be used for image output formats ===== Chart1.Width = 450; Chart1.Height = 290; //=== use your methods eg via DB to populate Chart or... Chart1.Series(0).FillSampleValues(20); //=== Set output format OutputStream=Chart1.Export.asPNG.SaveToStream(); //=== Cleanup the Chart ===== Chart1=null; //===Send off the finished product ==== Response.Binarywrite(OutputStream); %> *************************************************************************