chart.selectBestAvailable()

Type: function(config)
Returns: Promise<void>

Selects best available objects (and deselects any already selected objects).

The config parameter should be a JavaScript object that looks like this:

chart.selectBestAvailable({
'number': 2,
'category': 1 // optional
'clearSelection': false // optional. Defaults to `true`
});

Have a look at the docs for the selectBestAvailable rendering parameter for more examples.

Do not use this method if you expect high load on-sales

chart.selectBestAvailable() calculates the best available seats in the ticket buyers browser, which means it will yield the same result for concurrent users. Use the server-side version of the seats.io best available algorithm instead.

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