Algorithm options for the dropdown.
All Entity Documents across entities (each with EntityName), used to power
the optional multi-entity source selector. When two or more are selected the
run becomes a multi-entity analysis (their vectors are merged server-side).
Restrict the entity picker to a specific list of entity names.
When empty (the default), all entity options from the
EntityOptions input are shown. When non-empty, only entities
whose Name appears in this array are shown.
Fires before a clustering run starts. Set event.Cancel = true
to prevent the run (e.g., for validation).
Fires before a visualization is saved. Set event.Cancel = true
to prevent the save (e.g., to prompt for a name first).
Whether the panel starts in a collapsed (minimized) state.
The user can toggle between collapsed and expanded by clicking the collapse chevron in the panel header.
The working configuration object.
Fires whenever any configuration value changes (entity, algorithm, K, epsilon, distance metric, max records, filter).
Payload is a snapshot of the entire config at the time of change.
Default algorithm selection when the panel initializes.
Fires when the 2D/3D projection toggle changes. Hosts should re-run (or re-project) so the change is reflected immediately — a 3D projection needs a Z coordinate that only a fresh run produces.
Entity Document options for the selected entity. Only shown when 2+ docs exist.
Filtered entity list for display (filtered by AvailableEntities).
Whether the panel body is currently visible.
Whether a clustering run is currently in progress.
When true, the Run button is disabled and shows a spinner.
Distance metric options for the dropdown.
Result metrics from the most recent clustering run.
When non-null, the metrics section is displayed at the bottom of the panel showing silhouette score, cluster count, etc.
Current panel left offset in pixels.
Current panel top offset in pixels.
Emitted when the user clicks Run and BeforeRunClustering was not
canceled. Payload is a snapshot of the current config.
Emitted when the user clicks the Save link and BeforeSave was
not canceled.
Whether to display the algorithm picker dropdown.
When false, the algorithm is fixed to DefaultAlgorithm.
Whether to show the 2D/3D projection toggle.
Whether to display the distance metric picker dropdown.
Whether to show the multi-entity source selector.
Whether the multi-entity source selector is expanded.
Whether to display the "Save this visualization" link.
Whether the Run button can be clicked.
Whether the Save button should be offered (there are results to save).
Whether there are enough documents to offer multi-entity selection.
Whether the current algorithm is K-Means (controls which parameter sliders are shown).
True when two or more source documents are selected (multi-entity mode).
The currently selected entity-document IDs for multi-entity clustering.
Format a silhouette score to 2 decimal places.
The raw silhouette score.
Formatted string (e.g., "0.72").
Format a computation time in milliseconds to a human-readable string.
Milliseconds.
e.g., "1.2s" or "450ms".
Whether a given document is currently selected.
Whether a silhouette score indicates good clustering quality.
The silhouette score to evaluate.
true if score >= 0.5.
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.
Handle algorithm dropdown change.
New algorithm value string.
Handle entity dropdown change.
New entity name.
Handle changes to any numeric/text config field (K, Epsilon, MinPoints, MaxRecords, Filter).
Start dragging the panel via header mousedown.
The native mouse event.
Handle distance metric dropdown change.
New metric value string.
Handle the multi-source accordion's expand/collapse.
Handle Run button click. Fires BeforeRunClustering, and if not
canceled, emits RunClustering.
Handle Save link click. Fires BeforeSave, and if not canceled,
emits SaveVisualization.
Set the legend/color mode.
Set the projection dimensionality (2 or 3).
Toggle the panel between expanded and collapsed states.
Toggle a document in/out of the multi-entity selection.
InternalTrackBy for algorithm options.
InternalTrackBy for entity options.
InternalTrackBy for metric options.
Fires specifically when the algorithm selection changes.
Useful for showing/hiding algorithm-specific UI in the parent.