ComponentOne Chart for .NET (2.0) Search HelpCentral 

ImageRenderMethodEnum.File Method

This setting creates temporary image files on the server. It is recommended in situations where you expect a lot of requests for a relatively small number of charts, or in situations where charts are complex and expensive to generate and do not change often.

By default, C1WebChart creates image file names automatically, based on a hash code obtained from the chart data itself. If the specified file is found on the server, the chart doesn’t have to be re-created, which makes this mechanism efficient. However, if the chart data changes often, a large number of image files will be created on the server. Depending upon other property settings the may or may not delete these files automatically.

Because it relies on the file system, this method enables the implementation of security settings to control which usernames may render and view the chart.

The ImageUri property specifies the path and filename of the image file to be generated. If you leave ImageUri empty, these names are automatically manufactured by the C1WebChart control. For both C1WebChart and C1WebChart3D, the default temporary file directory is C1WebChartTemp.

The following example shows the type of <img> tag that this method creates:

<img id='c1wc' src='C1WebChartTemp/c1c_105….png' />

The src attribute specifies the location of the temporary image file on the server, and the file name contains a hash code that is unique for the chart data. Since this method doesn’t require transferring image data, the ImageTransferMethod property is not relevant.

Note: This render method not only allows the use of file security, it also requires it. The directory where the image files are created must have write permission for all usernames running the application.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.