ChartDirector 6.0 (ASP/COM/VB Edition)

Clickable Charts Operation Overview


For a browser to display an image with an image map, the following sequence of events must have occurred:

  1. The browser sends a HTTP request to the server.

  2. The server returns a HTML web page that contains an <IMG> tag for the image, and the <MAP> and <AREA> tags for the image map.

  3. The browser receives the HTML web page. It then sends another HTTP request to the server using the URL in the <IMG> tag for the actual image.

  4. The server returns the actual image to the browser.
Note that the chart image needs to be generated in step (2) for the purpose of getting the image map. However, the image itself can only be delivered to the browser in step (4), which is another HTTP connection. So after the chart image is produced in step (2), it must be saved in "some place" that is persistent across multiple HTTP connections. When step (4) occurs, the server can send the image to the browser.

The "some place" can be a web server "session variable" or a temporary file. ChartDirector uses BaseChart.makeSession for outputting to session variables, and BaseChart.makeTmpFile for outputting to temporary files.

The advantages of the "session variable" approach is that it does not need to create temporary files on hard disk. In ASP, "session variables" requires the browsers to have cookie support enabled. This is not a limitation in most cases, as many web sites nowadays require cookies or they may not work properly. So using cookies is widely accepted.

On the other hand, if you need your site to work without using cookies or "session variables", you may use temporary files. BaseChart.makeTmpFile automatically creates temporary files in a given directory. Furthermore, it automatically removes files older than a certain time (default 600 seconds) to avoid accumulation of temporary files.

The clickable examples in this documentation will be based on the "session variable" approach. Only minor modifications are required to change them to use temporary files. See BaseChart.makeTmpFile for details.