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

Specifies the maximum size of the cache in KB (if caching is used).

Visual Basic
Public Sub SetMaxCacheSize( kilobytes As Integer )
C#
public void SetMaxCacheSize( int kilobytes );

Arguments

kilobytes
A integer that specifies the size in KB.

Remarks

If not defined in the Swiff Chart Generator Control Panel, the default maximum cache size is 4096 KB (4 MB).
The cache is automatically managed by Swiff Chart Generator so that it never allocates more than this amount of memory on disk.

This method overrides the Max Cache Size parameter value in the Swiff Chart Generator Control Panel as well as in the swfchart.ini configuration file

Sample Code

The following code illustrates use of the SetMaxCacheSize method.

Visual Basic
' Create the chart series
chart.SetDataFromTxtFile("C:\\myData.txt")
chart.LoadStyle("C:\\myStyle.scs")

' Set the maximum cache size to 20 MB
chart.SetMaxCacheSize(20*1024)
C#
// Create the chart series
chart.SetDataFromTxtFile("C:\\myData.txt");
chart.LoadStyle("C:\\myStyle.scs");

// Set the maximum cache size to 20 MB
chart.SetMaxCacheSize(20*1024);

See Also

SetMaxCacheSize Method | SetPrivateCacheDir Method | ClearCache Method | UseCache Method

Applies To: Chart Object