IExport.Stream
IExport

function Stream(StreamType: EStreamType): OleVariant;

Type Library
TeeChartx

Description
This method is now deprecated. Please see the IJPEGExport and INativeExport interfaces for the newer, more complete functionality.

Use the Stream method to output the Chart as a Stream. This is useful, typically, for ASP applications in which a Chart can be generated and consecutively fed to a browser page. Stream presently support Jpeg or native tee template formats. If generating a tee template as stream then please use TeeChart's corresponding Import.LoadFromURL to import the Chart.

Examples [VBScript]:

1. ASP Script to create/load a Jpeg Chart (eg. CreateChart.asp).

<%

' Create Chart

Set TChart1 = CreateObject("TeeChart.TChart")

' Set Chart characteristics

TChart1.Header.Text(0)="Performance"

TChart1.Aspect.View3D=False

' Add a Series

TChart1.AddSeries(1) 'scBar

' Use your methods eg via DB to populate Chart or...

TChart1.Series(0).FillSampleValues 50

' Size Chart for image export

TChart1.Height=300

TChart1.Width=500

Response.BinaryWrite TChart1.Export.Stream(0) 'stJpeg

%>

Corresponding HTML page

<HTML>

<HEAD></HEAD>

<BODY>

<P>Run script via image src to display Chart</P>

<IMG src="http://your.chartserver.com/Charts/CreateChart.asp">

</BODY></HTML>

2. Import tee template created via a script called "CreateChartAsTee.asp" (VBScript)

TChart1.Import.LoadFromURL _

("http://your.chartserver.com/Charts/CreateChartAsTee.asp")