chart.trySelectObjects()
Type: function(objectsToSelect: array)
Returns: Promise<void>
Attempts to select matched objects, prompting missing information such as ticket types with with a dialog.
The parameter objectsToSelect
must be an array of strings or an array of objects.
chart.trySelectObjects(['A-1', 'A-2']);
chart.trySelectObjects([{label: 'A-1', ticketType: 'adult'}]);
chart.trySelectObjects(['General Admission 1', 'General Admission 1']);
chart.trySelectObjects([{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.