Return the color depending on the time in relation to the KPI
Subscribe to the store.
Get the data within the 75th percentile of all current results for the given context
Get the total count of results plus the number of results within each context.
Get the percentage for each context. The cumulative value informs the data viz at which x axis value the bar should start at. The bar class modifier is used in the CSS to change the bar colour
Destroy stacked bar charts for each context and set them to undefined so they will be created from scratch again
Checks if the visualisation has been created yet
Shows the loading indicator for the mean core vital values and hides the stacked bar charts and then destroys them so they can be created from scratch again when the new data is fetched from the database.
Handles a repeated Turbo visit to the dashboard page.
Remove all of the color classes for the given target
Handles a resize of the screen by width but ignores height changes. Deletes the current visualisation and the instances of the stacked bar charts so they will be created from scratch again.
Creates a new instance of the SingleStackedBar class if not created, otherwise returns the instance of the class
Changes the visibility of the stacked bar charts to either show the data vis or a loading indicator
Triggered by the store whenever any store data changes.
Update the datavisualisation showing the split of good, okay, bad for the context
Sets the text for the mean core vital for the given context and alters to color to indicate whether it's good, needs improvement or poor.
Update the summary details for the mean values and stacked bar charts