HistogramController

HistogramController

Stimulus controller that handles the histogram data visualisation.

Constructor

new HistogramController()

Source:

Extends

  • Controller

Methods

connect()

Source:

Subscribe to the store. Debounces the method for handling window resizes

disconnect()

Source:

Unsubscribe from the store

histogram()

Source:

Creates a new instance of the Histogram class if not created, otherwise returns the instance of the class

isDataVizEmpty()

Source:

Checks if the visualisation has been created yet

reconnect()

Source:

Handles a repeated Turbo visit to the dashboard page.

resize()

Source:

Handles a resize of the screen by width but ignores height changes. Deletes the current visualisation and the instance of the Histogram class so it will be created from scratch again.

storeUpdated()

Source:

When the context is selected the data visualisation will either be creted or updated