Generates a Flash movie, a JPEG image or a PNG image from a chart object and writes it to the output.

object->ExportAsResponse( )

Arguments

object
Required. A Chart object.

Remarks

The method actually:

The output file format (i.e. Flash movie, JPEG image or PNG image) is defined by the method SetOutputFormat.

PHP Sample Code

The following PHP code illustrates use of the ExportAsResponse method.

// Create the chart series
$values_1= array();
$values_2= array();

$values_1[0] = 10;
$values_1[1] = 20;
$values_1[2] = 30;

$values_2[0] = 100;
$values_2[1] = 200;
$values_2[2] = 300;

$chart->AddSeries();
$chart->SetSeriesValuesFromArray(0, $values_1);

$chart->AddSeries();
$chart->SetSeriesValuesFromArray(1, $values_2);

// Set the graphics settings from a style file
$chart->LoadStyle("C:\\myStyle.scs");

// The chart is complete, we can now generate the movie
$chart->ExportAsResponse();

See Also

ExportAsFile Method | ExportAsBinary Method SetOutputFormat Method

Applies To: Chart Object