ChartDirector 6.0 (Perl 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 a ChartDirector chart image needs to be generated in step (2), so that we can produce 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". When step (4) occurs, the server can send the image to the browser.

The "some place" can be a "temporary file" or a "session variable".

In Perl, there is no standard way to use session variables in web servers, so the clickable examples in this documentation will be based on the "temporary file" approach.

To make using temporary files easy, ChartDirector has a special method BaseChart.makeTmpFile that saves charts in temporary files and automatically remove old temporary files.