Generating descriptive text is simple, especially when you use the PopChart Embedder. The PopChart Embedder will automatically insert the d link, complete with the reference to the descriptive text on PopChart Server, into the embedding HTML.
To instruct PopChart Server to return a link to descriptive text along with the PopChart image that it embeds, simply set the returnDescriptiveLink attribute to true, as illustrated below.
myPopChart.returnDescriptiveLink = true;
Some users may also want to customize the language of their descriptive text. To do this, set the PopChart Embedder language attribute to the two-character encoding for your language. For example, to set the language to English, use the following command.
Of course, since English is the default language, this line of code is unnecessary.
Note: Make sure that the descriptive text settings for your language are defined in the descriptive text template. By default, the template only contains settings for English. You will have to add settings for other languages (see "Adding Support for Additional Languages" in Chapter 8 of the PopChart Server Reference manual).
If you are requesting your images directly through HTTP requests to PopChart Server, you will have to build your descriptive link manually.
Note: For more information about requesting PopChart images directly through HTTP requests, refer to Chapter 11, "Getting PopChart Images with HTTP Requests."
To do this, first of all append the @_TEXTDESCRIPTION command to your server command string. This command requires that a two character language code follow it. If you are showing your text description in English, this code is EN. Thus, you would add @_TEXTDESCRIPTIONEN to your server command string.
For example, suppose that the server command string to request your PopChart image is
@_FILEapfiles/bar.pcxml@_LOADPCXMLpcxml/data1.pcxml
Your server command string to request a text description would be:
@_FILEapfiles/bar.pcxml@_LOADPCXMLpcxml/data1.pcxml
@_TEXTDESCRIPTIONEN
Then, after the object, embed, or image tag that you use to embed your PopChart image, insert a hyperlink tag whose source is the HTTP request that results from your server command string.
For example, using the server command string shown above, we would embed a GIF image and a descriptive text link with the HTML in Example 8.2.