Class: CustomMetricPresenter

CustomMetricPresenter(dialogId, availableOptions, onSelectionChanged, dropdownSelector)

Presenter for custom metric configuration and management. Handles the definition and presentation of custom metrics that combine multiple submetrics based on user selection. Manages dialog interactions and maintains the current custom metric definition.

Constructor

new CustomMetricPresenter(dialogId, availableOptions, onSelectionChanged, dropdownSelector)

Create a new CustomMetricPresenter.
Parameters:
Name Type Description
dialogId string ID of the configuration dialog element.
availableOptions Array.<string> Array of available submetric options.
onSelectionChanged function Callback when custom definition changes.
dropdownSelector string CSS selector for the submetric dropdown to update.
Source:

Methods

getCurrentDefinition() → {Array.<string>|null}

Get the current custom metric definition.
Source:
Returns:
Array of selected submetrics or null if none.
Type
Array.<string> | null

hideDialog()

Hide the custom metric configuration dialog.
Source:

setCurrentDefinition(definition)

Set the current custom metric definition.
Parameters:
Name Type Description
definition Array.<string> | null Array of submetrics to select.
Source:

showDialog()

Show the custom metric configuration dialog.
Source: