Namespace: GlobFX.SwiffChartGenerator
Assembly: GlobFX.SwiffChartGenerator (in GlobFX.SwiffChartGenerator.dll)

Specifies the debug mode of the chart object.

Visual Basic
Public Sub SetDebugMode( level As Integer )
C#
public void SetDebugMode( int level );

Arguments

level
An integer value that specifies the debug mode.

Remarks

The valid debug modes are:

Mode Definition
0
No error is raised and no error message is printed.
If an error actually occurs, the script is not stopped and an empty chart is generated.
1
This is the default behavior.
Errors are raised and sent to the web server.
The script is stopped and an error message is sent in place of the actual output.
This means that an erroneous script could output a text message when it was supposed to output binary Flash data or binary image data.
2
Errors can occur but the script is not stopped.
The result is correctly generated, in the requested output format.
However the resulting output is a blank image containing the error message displayed on a yellow background.

The default debug mode is 1.
Note: There is no performance difference between the various debug modes.

Sample Code

The following code illustrates use of the SetDebugMode method.

Visual Basic
' Specify the debug mode
chart.SetDebugMode(2)

' Load a chart style and specify a visibly erroneous style name
' It should be: "column/Honolulu"
chart.LoadStyle( "column/BUGBUGBUG/Honolulu" )

' Set data
chart.SetSeriesValuesFromString( 0, "34;56;23;76" )

' Output the chart
chart.OutputFormat = OutputFormat.Png
print chart.GetHTMLTag
C#
// Specify the debug mode
chart.SetDebugMode(2);

// Load a chart style and specify a visibly erroneous style name
// It should be: "column/Honolulu"
chart.LoadStyle( "column/BUGBUGBUG/Honolulu" );

// Set data
chart.SetSeriesValuesFromString( 0, "34;56;23;76" );

// Output the chart
chart.OutputFormat= OutputFormat.Png;
print chart.GetHTMLTag();

This example will output the following result:

See Also

OutputFormat Property | ExportAsFile Method | ExportAsBinary Method | GetHTMLTag | GetOutputLocation Method

Applies To: Chart Object