chart.changeConfig()

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

Change the configuration of the chart. Currently supported parameters are:

  • objectColor
  • objectLabel
  • numberOfPlacesToSelect
  • maxSelectedObjects
  • ticketListings
  • extraConfig
  • availableCategories
  • unavailableCategories
  • filteredCategories
  • pricing
  • channels

The chart is re-rendered after configuration changes.

chart.changeConfig({
objectColor: object => object.isSelectable() ? 'green' : 'red'
});
chart.changeConfig({
objectLabel: object => object.label
});
chart.changeConfig({
numberOfPlacesToSelect: 3
});
chart.changeConfig({
numberOfPlacesToSelect: null // unset numberOfPlacesToSelect
});
chart.changeConfig({
maxSelectedObjects: 3
});
chart.changeConfig({
maxSelectedObjects: null // unset maxSelectedObjects
});
chart.changeConfig({
ticketListings: [
{section: '108', quantity: 4, price: 25},
{section: '108', quantity: 2, price: 35}
]
});
chart.changeConfig({
extraConfig: {
vipSeats: ['A-1', 'A-2', 'A-3']
}
});
chart.changeConfig({
unavailableCategories: ['Stalls', 'Choir'] // this will deselect objects that belong to an unavailable category
});
chart.changeConfig({
availableCategories: ['Stalls', 'Choir'] // this will deselect objects that belong to an unavailable category
});
chart.changeConfig({
filteredCategories: ['Stalls', 'Choir']
});
chart.changeConfig({
channels: ['54a1649b-732f-4fb9-9403-ef52dc2f7722'] // pass in `null` instead of an array to remove all configured channels
});