BubbleChart.selectItems

Syntax

selectItems(items: Object, reset: Boolean);

Parameters

items. Array of objects to be selected.

reset. Indicates if current selections are removed. If this parameter is true the current selections are removed, otherwise they are not.

Description

The selectItems method sets selection for specified bubble chart bubbles.

Example

To execute this example, the HTML page must contain the BubbleChart component named bubbleChart (see Example of Creating the BubbleChart Component).

Create and set effects for selected and not selected elements. Set selection for the specified bubble chart item:

// Create selection effect
var activeEffectSettings = {
    ROffset: 50,
    GOffset: 50,
    BOffset: 50,
    AOffset: 50
}
var activeEffect = new PP.Ui.HighlightEffect(activeEffectSettings);
// Create selection effect
var inactiveEffectSettings = {
    ROffset: -100,
    GOffset: -100,
    BOffset: -100,
    AOffset: -100
}
var inactiveEffect = new PP.Ui.HighlightEffect(inactiveEffectSettings);
// Set effects for selected and not selected elements
bubbleChart.setSelectActiveEffects([activeEffect]);
bubbleChart.setSelectInactiveEffects([inactiveEffect]);
// Set elements selection
var selectedItems = {
    Serie0_Point0: true
}
bubbleChart.selectItems(selectedItems, true);

After this element selection is set:

Remove selection:

// Deselect items
bubbleChart.setSelectedItems();
// Refresh bubble chart
bubbleChart.refresh();

After this selection is removed.

BubbleChart