Now that you have set the basic attributes of your PopChart image, you are ready to customize your image. You can customize your image by adding data, as well as features like PopUp text and drill-down effects.
Later chapters will delve into these topics. For nowjust for the sake of our examplewe will add only one customization. We will change the title of our text box to Hello World.
To do this, we will a send line of PopChart Script to PopChart Server. PopChart Script (PCScript) is a scripting language that allows you to make last-second changes to an appearance file. Chapter 5, "PCScript," in the PopChart Server Reference manual discusses PCScript in detail.
The following line of PCScript changes the text in our title box to Hello World.
To send this PCScript command to PopChart Server, you would use the pcScript attribute of the PopChart Embedder, as in the line of code below:
myPopChart.pcScript = "title.setText(Hello World)";
After adding this simple customization, you should have inserted the following code into your web page:
Example 4.6 Example Code After Customization
<script language="JavaScript1.2" src="http://localhost:2001/jsEmbedder"></script>
<script language="JavaScript1.2">
<!-- // Embedding a PopChart Image
myPopChart = new PopChartEmbedder();
myPopChart.appearanceFile = "examples/apfiles/bar.pcxml";
myPopChart.imageType = "FLASH";
myPopChart.fallback = "STRICT";