Constructor
new SelectContextController()
Extends
- Controller
Methods
connect()
Subscribe to the store.
contextClicked()
Sets the selected class on the clicked button and updates the store with the context clicked and the data for the context
contextSelected()
Use the button text to set the context.
disconnect()
Unsubscribe from the store
reconnect()
Handles a repeated Turbo visit to the dashboard page.
selectContextData()
Get the data for the selected context. Also set the value to be used on the x axis. If there is no data for the context then return a dummy object in an array.
storeUpdated()
Triggered by the store whenever any store data changes. In this case it checks for selectedDataVizData to be set and then sets production as the initially selected context button.