Q1431022. How ChartFX IE generates image file names

The information on this article applies to
Summary
This article describes how ChartFX generates image file names and options how to control/manage these file names.

Description
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.

' To generate a JPEG image

Chart.ImgWidth = 400
Chart.ImgHeight = 350
Chart.ImgTags = "Jpeg"
Chart.Export CHART_IMAGE,"C:\Charts\Test.jpg"

' To generate a JPEG image

Chart.ImgWidth = 400
Chart.ImgHeight = 350
Chart.ImgTags = "Png"
Chart.Export CHART_IMAGE,"C:\Charts\Test.png"

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).

Related Articles
Q1231015 Troubleshooting image generation
Q1232002 Incorrect width and height in Image generation
Q1233014 PNG generation for Netscape browsers
Q1411014 How to use the CheckBrowser Mehtod
Q1432012 Left, Right, Top and Bottom Gap settings may be ignored when generating images
Q1432028 Updated IE5 displays a red X when generating a static image
Q1432033 Incorrect image size when generating images using the Export method
Q1432036 GetHtmlTag generates an image with an incorrect size
Q1433032 New GetHtmlDataEx method allows to retrieve image and imgmap


ArticleID:Q1431022
Keywords:Image;Server; ASP;Server; ASP
Reviewed:2/29/2000 7:11:00 PM

DISCLAIMER INFORMATION:
Information in this document is subject to change without notice and does not represent a commitment on the part of Software FX, Inc. The software, which includes the information contained in any databases, described in this document is furnished under a license agreement or nondisclosure agreement. The software may be used or copied only in accordance with the terms of those agreements. It is against the law to copy the software on any medium except as copy of the software for backup purposes. No part of this article may be reproduced or transmitted in any form or by any means including recording, or information storage and retrieval systems, for any purpose other than the purchaser's personal use, without the express written permission of Software FX, Inc.

Software FX, Inc. disclaim all warranties, either express or implied, including but not limited to implied warranties of merchantability and fitness for a particular purpose, with respect to the instructions contained in this article.

In no event shall Software FX, Inc. be liable for any damages whatsoever including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss, even if Software FX, Inc. has been advised of the possibility of such damages. Because some states do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.