EaxGridView.getLegend

Syntax

getLegend (eaxIndicator: PP.Exp.EaxObjectIndicator) : PP.Ui.IntervalsLegend;

Parameters

EaxIndicator. Metric type.

Description

The getLegend method returns an interval legend object, which type corresponds with the metric type passed as a parameter.

Comments

Available values of the parameter:

Example

Executing the example requires that the HTML page contains the EaxGrid component named eaxGrid (see Example of Creating the EaxGrid Component). The component displays an express report with the table, for which the Background Color metric has been determined. A legend must be displayed for the Background Color table metric.

eaxGrid.Rendered.add(function () {
	var legend = eaxGrid.getLegend(PP.Exp.EaxObjectIndicator.BackgroundColor);
	// Set color and transparency of the brush for legend element highlighting
	var brush = legend.getHighlightBrush();
	brush.setColor("#FF0000");
	brush.setOpacity(0.3);
	legend.setHighlightBrush(brush);
	// Set color of highlighted legend elements
	legend.setHighlightItemColor("LightSeaGreen");
	// Enable legend element highlighting
	legend.setDoHighlight(true);
	// Set highlighting display mode on click
	legend.setHoverMode(PP.HoverMode.Click);
});
eaxGrid.refreshAll();

Click any element of the Background Color interval legend with the left mouse button.

After executing the example, the following legend properties have been changed: color and transparency of the brush for highlighting legend elements, color of highlighted elements; highlighting display mode on click has been set, and highlighting of legend elements has been enabled.

See also:

EaxGridView