Embedding PopChart Images in a Web Page

Chapter 4

This chapter will walk you through the process of embedding a simple PopChart image into a web page. This chapter assumes that you have successfully installed PopChart Server, and that you have been able to start it. If this is not the case, please review Chapter 2, "Installation."

In this chapter, we will use the JavaScript version of the PopChart Embedder utility to embed the example PopChart. As long as you have a basic knowledge of HTML and JavaScript, you should be able to follow along. The PopChart Embedder utility is described briefly in "Introducing the PopChart Embedder" at the beginning of this chapter.

The procedure for embedding a simple PopChart image consists of the following steps:

1. Importing the PopChart Embedder Library

2. Delimiting the Code For Your PopChart Image

3. Instantiating a PopChart Embedder Object

4. Setting the Server Information

5. Choosing an Appearance File

6. Changing the Image Format

7. Changing the Size of Your Image

8. Customizing Your PopChart

9. Writing the Image to Your Web Page

The sections in this chapter discuss each of these steps in detail.

For a more complex PopChart image, of course, you will also want to add data, interactivity, and special effects. These features will be discussed in Chapter 6, "Sending Dynamic Data to PopChart Server," and Chapter 7, "Interactive and Special Effects."