Specifies the output format of the generated chart.
object.SetOutputFormat output_format
The methods GetOutputLocation, ExportAsResponse, ExportAsFile and ExportAsBinary generates the final chart as an image or a Flash movie. The output format of the generated chart is specified by the SetOutputFormat method.
If not specified, the default output format is "SWF" (i.e. Macromedia Flash movie)
The output format is defined by a string value (the output_format parameter) which is interpreted as follows:
Code | Definition |
---|---|
"SWF" |
Macromedia Flash movie |
"JPG" |
JPG ImageJPG |
"PNG" |
PNG Image (Portable Network Graphics) |
The following VBScript code illustrates use of the SetOutputFormat method.
'Create the chart series Dim categories(2) Dim values(2) categories(0) = "Jan" categories(1) = "Feb" categories(2) = "Mar" values(0) = 10 values(1) = 20 values(2) = 30 chart.SetCategoriesFromArray categories chart.AddSeries chart.SetSeriesValuesFromArray 0, values 'Set the chart title chart.SetTitle "My Chart" 'Set the graphics settings from a style file chart.LoadStyle "C:\myStyle.scs" 'The chart is complete, we can now generate the chart as a JPEG image chart.SetOutputFormat "JPG" chart.ExportAsResponse
GetOutputLocation Method | ExportAsResponse Method | ExportAsFile Method | ExportAsBinary Method
Applies To: Chart Object