Active Label Parameters

All NetCharts applets support the display of informational labels, called dwell or active labels, whenever the mouse "dwells" over a specified data value. For example, on a barchart, the value of an individual bar can be displayed when the mouse cursor hovers over a given bar for a short period of time.

Additionally, the user can click the mouse button while an active label is displayed, which will result in a pre-defined URL being executed. This URL can be used to replace the current HTML document with any other HTML document, or to alter the display of any named frame or window within the browser. This "drill-down" capability is extremely flexible and it allows any NetCharts chart to serve as a graphical interface to additional information, be it graphical or textual, which may be accessed from another document or CGI script.

Through the following parameters, the developer can enable/disable these labels, specify the label to be displayed and specify a URL to be displayed when the label is activated.

DwellLabel   = (Label Tuple);
DwellBox     = (Region Tuple);
ActiveLabels = ("Label1", "URL1", "Target1"),
               ("Label2", "URL2", "Target2"),
               ...;
ActiveClicks = Number;
If the DwellLabel parameter is defined, then a label will automatically be displayed whenever the mouse cursor "dwells" over a given data value. The Label Tuple defined for the Dwell Label parameter specifies the format of each label, not the text value. Accordingly, the label attribute of the DwellLabel parameter is ignored, unless it is set to "OFF", in which case, dwell processing is disabled. (This mode can be used by dynamic updating servers, to disable dwell processing after it has already been enabled.) See Label Parameters for more details about label attributes.

The DwellBox parameter is optional. If specified, it defines a box to be displayed as a background for each dwell label. The box will be automatically scaled to fit each dwell label. See Region Parameters for more details about region attributes.

The ActiveLabels parameter is optional and may be used to specify the dwell label for one or more data values. In most charts, the ActiveLabels parameter is specified using a numeric ID (such as ActiveLabels1 or ActiveLabels5) to indicate which data set is being referenced. Each tuple defined in the ActiveLabels parameter is matched with the corresponding data value defined in the DataSet or equivalent parameter. If too many active labels are defined, the extra tuples are ignored. If too few are defined, the remaining data values will use the default dwell label generated.

A given active label is defined using 3 optional attributes. If the first attribute is defined, then it's value will be used as the text value for the dwell label for the corresponding data value. For example, the following parameter settings:

DwellLabel    = ("", black, "Courier", 12);
DwellBox      = (yellow, SHADOW, 4);
DataSet1      = 12, 34, 56;
ActiveLabels1 = ("Twelve"), ("Thirty-Four"), ("Fifty-Six");
specify the English equivalent of each barchart data value to be displayed as the dwell label. Any text string can be specified for a dwell label, including newline ('\n') characters for multi-line labels.

If the first attribute is not defined or is defined to be "" (the empty string), then a default label will be generated for that data value, depending on the specific chart type. Usually, the default label displays one or more of the numeric values associated with the data point.

The second ActiveLabels attribute can be used to specify an arbitrary URL that is accessed whenever the user clicks the mouse over the active label. In that case, the given URL is accessed and the resulting document is displayed a specified browser frame or window. In the default case, the current document is replaced by that represented by the URL.

The third ActiveLabels attribute can be used to specify the target frame or window for the given URL. If it is not defined, the current frame or window will be updated.

The ActiveClicks parameter specifies the number of mouse clicks needed to activate the URL that may be associated with each dwell label using the ActiveLabels parameter.

Examples

In this example, default dwell labels are displayed for each of the bars shown in the barchart. To see each label, simply move the mouse cursor over a bar and let it remain there for a few moments.

DwellLabel    = ("", black, "Courier", 12);
DwellBox      = (yellow, SHADOW, 4);

In this example, the text associated with some of the labels has been specified directly, using the ActiveLabels parameter.

DataSet1      = 100, -25, 75, 63, -46;
DataSet2      = 85, 45, 10, -67, 10;
DataSet3      = 25, -56, -90, 10, 20;

DwellLabel    = ("", black, "Courier", 12);
DwellBox      = (yellow, SHADOW, 4);

ActiveLabels1 = ("One Hundred"), ("Negative\nTwenty Five");
ActiveLabels2 = (""), (""), ("Ten"), ("Click Here\nTo See Details");

In this example, two different HTML files are assigned as the URL for two of the bars. To activate each URL, move the mouse over the bar until the active label appears, then double-click the mouse button. At that point, the document will appear in a separate browser window.

DataSet1      = 100, -25, 75, 63, -46;
DataSet2      = 85, 45, 10, -67, 10;
DataSet3      = 25, -56, -90, 10, 20;

DwellLabel    = ("", black, "Courier", 12);
DwellBox      = (yellow, SHADOW, 4);

ActiveClicks  = 2;

ActiveLabels1 = ("Monday Log", "DwellMonday.html", "NewWindow"),
                ("Tuesday Log", "DwellTuesday.html", "NewWindow");