PopUp Text

Popup text is used to display additional or supplemental information about an item (bar, pie wedge, or x-y point) in a graph. PopUp text is called PopUp text because it "pops" up as the user places his or her mouse over an item in a graph.

Popup Text looks a lot like a roll-over data label, but it is assigned to a specific data item, like a Note. Like PopChart Notes, PopUp text is useful when you want to call someone's attention to an important fact about a specific data item.

Note: If you would like your PopUp text to show data values or series names for every data item in the graph, you should use PopChart Server's new custom data label feature instead (refer to "Changing the Data Label Format").

The image below shows a Pie Chart that uses PopUp text. The appearance file for this image is located at examples/apfiles/piepopup.pcxml.


Note: PopUp text is supported in GIF and PNG images via image maps. There are several unfortunate consequences of this. First of all, you cannot use PopUp text in GIF or PNG images without the PopChart Embedder. Also, feedback for PopUp text in GIF and PNG images may be slow no matter how you embed your PopChart images. In NetscapeŽ browsers, you may be unable to get PopUp text without also enabling a drill-down effect for the specified data item. Finally, you will be unable to customize the appearance of your PopUp text.

Adding PopUp Text

You can add PopUp text to your graph dynamically with PCScript or PopChart XML.

Note: You can change the format of your PopUp text in the Graph Properties > PopUp dialog pane of PopChart Builder.

PCScript

To add popup text to a graph use the graph. AddPopupText() method in PCScript. The first parameter of the graph. AddPopupText() method is the name, or number of the category. The second parameter is the name or number of the series. The third parameter is the text that will be shown.

The following PCScript generated the PopUp text in the above:

Graph.AddPopupText(1, 2, Pretzel Sales were Low Due to Inadequate Supply)

For graphs that do not have categories (X-Y and Time Plot), you should specify the number of the data item instead of the category. In other words, if the data item is the fifth in a data series, you would specify 5 as the first parameter.

Warning: Do not use the Sort Data feature of X-Y or Time Plot graphs when you use PopUp text—if you do, your PopUp text may be associated with the wrong data item.

PopChart XML

You can also add PopUp text to a data item by setting the Popup attribute of the Data element in PopChart XML, as shown below. Adding PopUp text in PopChart XML must be done when you send your data to PopChart Server.

<Data Value="34" Popup="This is PopUp Text" />