IntervalsLegend.ItemHovered

Syntax

ItemHovered: function(sender, args, timeout);

Parameters

sender. Event source.

args. Event information. Available arguments: Item - legend element, Hovered - indicates whether a cursor is hovered or not.

timeout. Time delay (milliseconds) after which the event is invoked.

Description

The ItemHovered event occurs on hovering the mouse cursor on a legend element.

Comments

The ItemHovered event occurs regardless of application of legend element highlighting when the element is hovered.

Example

Executing the example requires that the HTML page contains the BubbleChart component named bubbleChart (see the Example of Creating the BubbleChart Component section.

// Get value interval legend
var legend = bubbleChart.getLegend();
// Set interval record format with both borders
legend.setBetweenFormat("from {0:0} to {1:0}");
// Set interval record format with the left border
legend.setGreaterFormat("greater than {0:0}");
// Set interval record format with the right border
legend.setLessFormat("less than {0:0}");
/*
Set position of element corresponding to absent data
in visualizer before other elements
*/
legend.setNoDataPosition(PP.Ui.NoDataPosition.Before);
legend.ItemHovered.add(
    function () {
        tbubbleChart.refresh();
    
);

After executing the example the following legend properties were changed: interval record format with right, left, and both borders, position and text of the element corresponding to absent data in visualizer. These changes will be displayed on hovering a cursor on the legend element.

See also:

IntervalsLegend