    This example uses 2 files:

    Client: ChartTypes.htm
    *************************************************************************
    <HTML>
    <HEAD><TITLE>Set Chart type</TITLE>
    <LINK REL=STYLESHEET TYPE="text/css" HREF="Style.css"></HEAD><BODY>
    <img src="TeeChartAX300x66.jpg">
    <br><br>
    <a href="ASPHome.htm">Back to Contents page</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>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=

    VBSCRIPT> Sub
       SetChart()FR1.location="ChartTypes.asp?ChartType=" _
                     + Form1.Target1.options(Form1.Target1.selectedIndex).value _
                     + "&View= " +
    Form1.Target2.options(Form1.Target2.selectedIndex).value End

    Sub Sub
       Window_Onload()FR1.location="ChartTypes.asp?ChartType=" _
                     + Form1.Target1.options(0).value _
                     + "&View=" + Form1.Target2.options(0).value
    End sub

    </SCRIPT>

    <FORM NAME="Form1" ACTION="">
    <SELECT NAME="Target1" language="VBScript" onchange="SetChart()">
    <OPTION SELECTED VALUE="0">Line</option>
    <OPTION VALUE="1">Bar
    <OPTION VALUE="2">HorizBar
    <OPTION VALUE="3">Area
    <OPTION VALUE="4">Point
    <OPTION VALUE="5">Pie
    <OPTION VALUE="6">FastLine
    <OPTION VALUE="7">Shape
    <OPTION VALUE="8">Gantt
    <OPTION VALUE="9">Bubble
    <OPTION VALUE="10">Arrow
    <OPTION VALUE="11">Candle
    <OPTION VALUE="12">Polar
    <OPTION VALUE="13">Surface
    <OPTION VALUE="14">Volume
    <OPTION VALUE="15">ErrorBar
    <OPTION VALUE="16">Bezier
    <OPTION VALUE="17">Contour
    <OPTION VALUE="18">Error
    <OPTION VALUE="19">Point3D
    <OPTION VALUE="20">Radar
    <OPTION VALUE="21">Clock
    <OPTION VALUE="22">WindRose
    <OPTION VALUE="23">Bar3D
    <OPTION VALUE="24">ImageBar
    <OPTION VALUE="25">Donut
    <OPTION VALUE="26">TriSurface
    <OPTION VALUE="27">Box
    <OPTION VALUE="28">HorizBox
    <OPTION VALUE="29">Histogram
    <OPTION VALUE="30">ColorGrid
    <OPTION VALUE="31">BarJoin
    <OPTION VALUE="32">HighLow
    <OPTION VALUE="33">Waterfall
    <OPTION VALUE="34">Smith
    <OPTION VALUE="35">Pyramid
    <OPTION VALUE="36">Map
    <OPTION VALUE="37">HorizLine
    <OPTION VALUE="38">Funnel
    <OPTION VALUE="39">Calendar
    </SELECT>

    <SELECT NAME="Target2" language="VBScript" onchange="SetChart()">
    <OPTION SELECTED VALUE="0">2D</option>
    <OPTION VALUE="1">3D
    </SELECT>

    </FORM>
    <div id="Framebox"><IFRAME ID=FR1 WIDTH=465 HEIGHT=310 FRAMEBORDER=0 SCROLLING=NO></IFRAME></div>

    <HR>Copyright © 2024 Steema Software SL</BODY></HTML>
    *************************************************************************

    Server: ChartTypes.asp
    *************************************************************************
    <!--METADATA NAME="TeeChart Pro v2024 ActiveX Control" TYPE="TypeLib" UUID="{DE7847A7-A266-4AA9-AA68-16676652C9DB}"-->
    <%
     'above Metadata line allows TeeChart constants to be used in the serverside script.
     'Alternatively include the "Includes/TChartConsts.vbs" constants file.

     Dim ChartType
     Dim OutputStream
     Dim ViewType

      '=== Create Chart ======
      Set Chart1 = 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.Walls.Left.Color=RGB(35,70,128)
      Chart1.Panel.Gradient.Visible=True
      Chart1.Panel.Gradient.StartColor=&HB3DEF5 '&H8CB4D2
      Chart1.Panel.Gradient.EndColor=&HFACE87

      '==== 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 =====
      Set Chart1=Nothing

      '===Send off the finished product ====
      Response.Binarywrite OutputStream
    %>
    *************************************************************************