Embedding a PopChart Image in an Image Tag

You can embed a GIF or PNG image in a web page simply by creating an appropriate HTTP request and making the request the source of an image tag.

You can generate a GIF PopChart image using the @_GIF server command. For example, the following HTTP request will generate a GIF PopChart image:

http://localhost:2001/?@_FILEexamples/apfiles/bar.pcxml@_GIF

Note: If you have enabled Automatic PNG Detection (see "Automatic PNG Detection" in Chapter 3 of the PopChart Server User Guide), this request will generate a PNG image on browsers that support PNG. You cannot override this functionality.

If you want to explicitly request a PNG image, you can use the @_PNG command instead.

The following image tag embeds the GIF image we created with the HTTP request above. It also provides an alternate text description of My PopChart in case the image loads slowly, or for the visually impaired.

<img src="http://localhost:2001/?@_FILEexamples/apfiles/bar.pcxml@_GIF" alt="My PopChart" />

This is a sidebar.