chart.listCategories()

Type: function()
Returns: Promise<Category[]>

const categories = await chart.listCategories()

Asynchronously fetches the chart categories. Useful to build a custom chart legend.

The promise resolves to an array of categories. For example:

[
{'accessible': false, 'color': '#E9B64D', 'key': 2, 'label': 'Ground Floor', 'pricing': {'price': 30, 'formattedPrice': '30€'}},
{'accessible': true, 'color': '#E8B64E', 'key': 3, 'label': 'Balcony', 'pricing': {'price': 40, 'formattedPrice': '40€'}}
]