Q1431022. How ChartFX IE generates image file names
This article describes how ChartFX generates image file names and options how to control/manage these file names.
When the GetHtmlTag method is invoked, ChartFX IE prompts IIS to translate a virtual path (/CfxTemp) into a physical folder, once the translation is done, it will generate a new file (derived from the current system date and time) in the CfxTemp folder.
When using the GetHtmlTag from a server side app or component or other web server that does not support the IIS intrinsic objects (such as ColdFusion), ChartFX IE will use the Absolute setting in the CfxSrv.ini and generate the file there.
You can use "_Image" instead of "Image" as the third parameter of the GetHtmlTag and ChartFX IE will return the URL of the image instead of the full HTML tag. This method allows you to do other things with the file name, such as storing this file name in a database, renaming the file, etc. e.g.
Chart.GetHtmlTag 400,350,"Image" will return
IMG SRC=/CfxTemp/CFT0228_040101157.chw WIDTH=400 HEIGHT=350
Chart.GetHtmlTag 400,350,"_Image" will return
/CfxTemp/CFT0228_040101157.chw
You can also use the Export method passing the first parameter as CHART_IMAGE (defined as 9) and the second parameter as a fully qualified name of the file you need to generate, in order to set the image type you will have to use the ImgTags property, e.g.
Please note that there seems to be a bug in Netscape when handling a file with a PNG extension, you may want to generate your PNG files with a GIF extension instead (even though internally they will be PNG files).
ArticleID:Q1431022 Keywords:Image;Server; ASP;Server; ASP