Skip to main content

chart.doSelectObjects()

Type: function(objectsToSelect: array)
Returns: Promise<void>

Selects matched objects, or fully fails if the selection cannot be completed. Will not trigger a modal dialog if information is missing.

The parameter objectsToSelect must be an array of strings or an array of objects.

chart.selectObjects(['A-1', 'A-2']);
chart.selectObjects([{label: 'A-1', ticketType: 'adult'}]);
chart.selectObjects(['General Admission 1', 'General Admission 1']);
chart.selectObjects([{label: 'General Admission 1', ticketType: 'adult', amount: 3}]);

If a String is provided, the objects that match the provided IDs will be selected.

If an array of objects is passed, these objects should have the following structure:

{
label: String, (required)
ticketType: String (optional)
amount: Number (optional)
}

Note that the promise does not resolve to an array of selected objects. Use onObjectSelected for that.