Loads the graphical parameters of a chart object from a Swiff Chart style file (.scs).

object.LoadStyle filename 

Arguments

object
Required. A Chart object.
filename
Required. A string that specifies the name of the Swiff Chart style file (.scs file).

Return Value

If the system fails to open the file identified by filename, the LoadStyle method raises an error.

Remarks

Style files (.scs) can be easily created with the Swiff Chart Editor. Learn more about Swiff Chart Editor.

The filename can be an absolute path or a simple name. If a simple filename is specified, the style will be searched in the standard styles directory. This directory depends on your installation. As an example, it could be "C:\Program Files\GlobFX Technologies\Swiff Chart Generator\styles".

The filename can be an absolute path or a simple name. If a simple filename is specified, the style will be searched in the standard styles directory. This directory depends on your installation. As an example, it could be "C:\Program Files\GlobFX Technologies\Swiff Chart Generator\styles".

If no extension is given in the filename string, the standard ".scs" extension will be added.

Loading chart graphical settings from a style file via the method LoadStyle sets the following parameters in the chart object:

Parameters Definition
width An integer value that specifies the width in pixels of the generated Flash movie.
This parameter can also be set with the SetWidth method
height An integer value that specifies the height in pixels of the generated Flash movie.
This parameter can also be set with the SetHeight method
frame rate An integer value that specifies the frame rate in frames per second of the generated Flash movie.
This parameter can also be set with the SetFrameRate method

VBScript Sample Code

The following VBScript code illustrates use of the LoadStyle method in an ASP page.

chart.SetSeparators ";", true
chart.SetDataFromQuery

(Load the style file "C:\myStyle.scs" 
chart.LoadStyle "C:\myStyle.scs"

chart.ExportAsResponse

The following VBScript code illustrates how to simply use a standard style. (taking into account that Swiff Chart Generator has been installed in the directory C:\Program Files\GlobFX Technologies\Swiff Chart Generator)

chart.SetSeparators ";", true
chart.SetDataFromQuery

'Load the standard style file "C:\Program Files\GlobFX Technologies\Swiff Chart Generator\styles\column\SanFrancisco.scs" 
chart.LoadStyle "column\SanFrancisco"

chart.ExportAsResponse

See Also

SetFrameRate Method | SetWidth Method | SetHeight Method

Applies To: Chart Object