Generates a Flash movie or an image from a chart and returns the corresponding binary data.
object->ExportAsBinary( )
The ExportAsBinary method returns a binary value that contains the generated Flash movie, or JPEG / PNG image, or SVG / PDF document.
This method is actually similar to the ExportAsResponse method. However, ExportAsBinary does not write the generated data to the output. The method actually:
The format of the generated content can be specified by the method SetOutputFormat.
The following PHP code illustrates use of the ExportAsBinary 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->SetSeriesValuesFromArray( 0, $values_1 );
$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
$bin_swf= $chart->ExportAsBinary();
// Once generated, we simply write the image to the output
Header("Content-Type: application/x-shockwave-flash");
Header("Expires: 0");
echo $bin_swf;
ExportAsFile Method | ExportAsResponse Method | SetOutputFormat Method
Applies To: Chart Object