DataVisualisationController

DataVisualisationController

Stimulus controller that handles the line chart data visualisation.

Constructor

new DataVisualisationController()

Source:

Extends

  • Controller

Methods

connect()

Source:

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

disconnect()

Source:

Unsubscribe from the store

isDataVizEmpty()

Source:

Checks if the visualisation has been created yet

lineChart()

Source:

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

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 LineChart 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