@memberjunction/ng-clustering 0.0.1 → 5.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +441 -27
- package/dist/__tests__/clustering-service.test.d.ts +2 -0
- package/dist/__tests__/clustering-service.test.d.ts.map +1 -0
- package/dist/__tests__/clustering-service.test.js +487 -0
- package/dist/__tests__/clustering-service.test.js.map +1 -0
- package/dist/__tests__/clustering-types.test.d.ts +2 -0
- package/dist/__tests__/clustering-types.test.d.ts.map +1 -0
- package/dist/__tests__/clustering-types.test.js +254 -0
- package/dist/__tests__/clustering-types.test.js.map +1 -0
- package/dist/__tests__/index.test.d.ts +2 -0
- package/dist/__tests__/index.test.d.ts.map +1 -0
- package/dist/__tests__/index.test.js +7 -0
- package/dist/__tests__/index.test.js.map +1 -0
- package/dist/__tests__/scatter-component-logic.test.d.ts +2 -0
- package/dist/__tests__/scatter-component-logic.test.d.ts.map +1 -0
- package/dist/__tests__/scatter-component-logic.test.js +494 -0
- package/dist/__tests__/scatter-component-logic.test.js.map +1 -0
- package/dist/lib/cluster-config-panel.component.d.ts +274 -0
- package/dist/lib/cluster-config-panel.component.d.ts.map +1 -0
- package/dist/lib/cluster-config-panel.component.js +732 -0
- package/dist/lib/cluster-config-panel.component.js.map +1 -0
- package/dist/lib/cluster-scatter.component.d.ts +514 -0
- package/dist/lib/cluster-scatter.component.d.ts.map +1 -0
- package/dist/lib/cluster-scatter.component.js +1357 -0
- package/dist/lib/cluster-scatter.component.js.map +1 -0
- package/dist/lib/clustering.module.d.ts +11 -0
- package/dist/lib/clustering.module.d.ts.map +1 -0
- package/dist/lib/clustering.module.js +34 -0
- package/dist/lib/clustering.module.js.map +1 -0
- package/dist/lib/clustering.service.d.ts +43 -0
- package/dist/lib/clustering.service.d.ts.map +1 -0
- package/dist/lib/clustering.service.js +253 -0
- package/dist/lib/clustering.service.js.map +1 -0
- package/dist/lib/clustering.types.d.ts +271 -0
- package/dist/lib/clustering.types.d.ts.map +1 -0
- package/dist/lib/clustering.types.js +74 -0
- package/dist/lib/clustering.types.js.map +1 -0
- package/dist/public-api.d.ts +6 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +11 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +40 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cluster-config-panel.component.js","sourceRoot":"","sources":["../../src/lib/cluster-config-panel.component.ts","../../src/lib/cluster-config-panel.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,UAAU,EACV,iBAAiB,EAGjB,SAAS,EACT,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAQH,oBAAoB,GACvB,MAAM,oBAAoB,CAAC;;;;;;ICrBR,iCAA8B;IAAA,YAAiB;IAAA,iBAAS;;;IAAhD,sCAAqB;IAAC,cAAiB;IAAjB,oCAAiB;;;IAY3C,iCAAyB;IAAA,YAAc;IAAA,iBAAS;;;IAAxC,iCAAgB;IAAC,cAAc;IAAd,iCAAc;;;;IAJ/C,AADJ,8BAAwB,YACb;IAAA,iCAAiB;IAAA,iBAAQ;IAChC,iCAC6E;IAArE,6QAAmD,uBAAgB,KAAC;IACxE,6HAEC;IAET,AADI,iBAAS,EACP;;;IANM,eAAmC;IAAnC,wDAAmC;IAEvC,cAEC;IAFD,sCAEC;;;IAsBO,iCAA4B;IAAA,YAAe;IAAA,iBAAS;;;IAA5C,oCAAmB;IAAC,cAAe;IAAf,kCAAe;;;;IAJnD,AADJ,8BAAwB,YACb;IAAA,yBAAS;IAAA,iBAAQ;IACxB,iCACqD;IAA7C,qOAAiB,iCAA0B,KAAC;IAChD,mKAEC;IAET,AADI,iBAAS,EACP;;;IANM,eAA4B;IAA5B,iDAA4B;IAEhC,cAEC;IAFD,sCAEC;;;;IAOL,AADJ,8BAAwB,YACb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AC,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC;QACpD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC;QACtD,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;IAEO,SAAS,CAAC,MAAkB;QAChC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;4HA9ZQ,2BAA2B;oEAA3B,2BAA2B;;;;;;;YClDpC,AANJ,iCAGiC,YAIe;YAAxC,wJAAa,6BAAyB,KAAC;YACvC,uBAAmC;YACnC,+BACA;YACI,AADJ,+BAA6B,WAKD;YADrB,yHAAS,oBAAgB,wBAAE,wBAAwB,KAAC;YAC/B,iBAAI;YAC5B,uBAA0D;YAElE,AADI,iBAAO,EACN;YAEL,qFAAkB;YA4JtB,iBAAM;;YA7KD,AADA,yCAAyB,6BACE;YASjB,eAAkC;YAClC,AADA,+CAAkC,oCACG;YAOhD,eA2JC;YA3JD,yCA2JC;;;iFDvHQ,2BAA2B;cANvC,SAAS;6BACM,KAAK,YACP,yBAAyB;;kBAkBlC,KAAK;;kBAQL,KAAK;;kBAWL,KAAK;;kBAUL,KAAK;;kBAWL,KAAK;;kBASL,KAAK;;kBAOL,KAAK;;kBAOL,KAAK;;kBAkBL,KAAK;;kBAUL,KAAK;;kBAUL,MAAM;;kBAMN,MAAM;;kBAoBN,MAAM;;kBAMN,MAAM;;kBAYN,MAAM;;kBAON,MAAM;;kBAyCN,SAAS;mBAAC,cAAc,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;kFA/MnC,2BAA2B","sourcesContent":["/**\n * @fileoverview Floating glass-morphism configuration panel for clustering.\n *\n * `ClusterConfigPanelComponent` provides a draggable floating panel with\n * entity picker, algorithm picker, parameter sliders, distance metric\n * selector, max records input, run button, and result metrics display.\n *\n * It emits cancelable `BeforeXXX` events so consumers can intercept and\n * validate before clustering starts or a visualization is saved.\n *\n * @example\n * ```html\n * <mj-cluster-config-panel\n * [IsRunning]=\"isRunning\"\n * [Metrics]=\"result?.Metrics ?? null\"\n * [EntityOptions]=\"myEntityOptions\"\n * [ShowSaveButton]=\"true\"\n * [DefaultAlgorithm]=\"'dbscan'\"\n * [Collapsed]=\"false\"\n * (BeforeRunClustering)=\"onBeforeRun($event)\"\n * (RunClustering)=\"onRunClustering($event)\"\n * (ConfigChanged)=\"onConfigChanged($event)\"\n * (SaveVisualization)=\"onSave()\">\n * </mj-cluster-config-panel>\n * ```\n */\n\nimport {\n Component,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n ChangeDetectorRef,\n OnInit,\n OnDestroy,\n ViewChild,\n inject,\n} from '@angular/core';\nimport {\n ClusterConfig,\n ClusterConfigPanelEntityOption,\n ClusterConfigPanelEntityDocOption,\n ClusterMetrics,\n ClusterAlgorithm,\n ClusterDistanceMetric,\n CancelableEvent,\n DefaultClusterConfig,\n} from './clustering.types';\n\n@Component({\n standalone: false,\n selector: 'mj-cluster-config-panel',\n templateUrl: './cluster-config-panel.component.html',\n styleUrls: ['./cluster-config-panel.component.css'],\n})\nexport class ClusterConfigPanelComponent implements OnInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n\n // ================================================================\n // Data Inputs\n // ================================================================\n\n /**\n * Whether a clustering run is currently in progress.\n *\n * When `true`, the Run button is disabled and shows a spinner.\n *\n * @default false\n */\n @Input() IsRunning = false;\n\n /**\n * Result metrics from the most recent clustering run.\n *\n * When non-null, the metrics section is displayed at the bottom\n * of the panel showing silhouette score, cluster count, etc.\n */\n @Input() Metrics: ClusterMetrics | null = null;\n\n /**\n * Entity options for the dropdown.\n *\n * The parent component is responsible for populating this list,\n * typically from MJ Metadata or a subset filtered by\n * `AvailableEntities`.\n */\n private _entityOptions: ClusterConfigPanelEntityOption[] = [];\n\n @Input()\n set EntityOptions(value: ClusterConfigPanelEntityOption[]) {\n this._entityOptions = value || [];\n this.rebuildFilteredEntities();\n }\n get EntityOptions(): ClusterConfigPanelEntityOption[] {\n return this._entityOptions;\n }\n\n /** Entity Document options for the selected entity. Only shown when 2+ docs exist. */\n @Input() EntityDocOptions: ClusterConfigPanelEntityDocOption[] = [];\n\n // ================================================================\n // Customization Inputs\n // ================================================================\n\n /**\n * Whether to display the \"Save this visualization\" link.\n *\n * @default true\n */\n @Input() ShowSaveButton = true;\n\n /**\n * Whether to display the algorithm picker dropdown.\n *\n * When `false`, the algorithm is fixed to `DefaultAlgorithm`.\n *\n * @default true\n */\n @Input() ShowAlgorithmPicker = true;\n\n /**\n * Whether to display the distance metric picker dropdown.\n *\n * @default true\n */\n @Input() ShowMetricPicker = true;\n\n /**\n * Default algorithm selection when the panel initializes.\n *\n * @default 'kmeans'\n */\n @Input() DefaultAlgorithm: ClusterAlgorithm = 'kmeans';\n\n /**\n * Restrict the entity picker to a specific list of entity names.\n *\n * When empty (the default), all entity options from the\n * `EntityOptions` input are shown. When non-empty, only entities\n * whose `Name` appears in this array are shown.\n *\n * @default []\n *\n * @example\n * ```html\n * <mj-cluster-config-panel\n * [AvailableEntities]=\"['Companies', 'Contacts', 'Deals']\">\n * </mj-cluster-config-panel>\n * ```\n */\n @Input() AvailableEntities: string[] = [];\n\n /**\n * Whether the panel starts in a collapsed (minimized) state.\n *\n * The user can toggle between collapsed and expanded by clicking\n * the collapse chevron in the panel header.\n *\n * @default false\n */\n @Input() Collapsed = false;\n\n // ================================================================\n // Standard Outputs\n // ================================================================\n\n /**\n * Emitted when the user clicks Run and `BeforeRunClustering` was not\n * canceled. Payload is a snapshot of the current config.\n */\n @Output() RunClustering = new EventEmitter<ClusterConfig>();\n\n /**\n * Emitted when the user clicks the Save link and `BeforeSave` was\n * not canceled.\n */\n @Output() SaveVisualization = new EventEmitter<void>();\n\n // ================================================================\n // Cancelable Outputs\n // ================================================================\n\n /**\n * Fires **before** a clustering run starts. Set `event.Cancel = true`\n * to prevent the run (e.g., for validation).\n *\n * @example\n * ```typescript\n * onBeforeRun(event: CancelableEvent<ClusterConfig>): void {\n * if (!event.Data.EntityName) {\n * event.Cancel = true;\n * alert('Please select an entity first.');\n * }\n * }\n * ```\n */\n @Output() BeforeRunClustering = new EventEmitter<CancelableEvent<ClusterConfig>>();\n\n /**\n * Fires **before** a visualization is saved. Set `event.Cancel = true`\n * to prevent the save (e.g., to prompt for a name first).\n */\n @Output() BeforeSave = new EventEmitter<CancelableEvent<ClusterConfig>>();\n\n // ================================================================\n // Informational Outputs\n // ================================================================\n\n /**\n * Fires whenever any configuration value changes (entity, algorithm,\n * K, epsilon, distance metric, max records, filter).\n *\n * Payload is a snapshot of the entire config at the time of change.\n */\n @Output() ConfigChanged = new EventEmitter<ClusterConfig>();\n\n /**\n * Fires specifically when the algorithm selection changes.\n *\n * Useful for showing/hiding algorithm-specific UI in the parent.\n */\n @Output() AlgorithmChanged = new EventEmitter<ClusterAlgorithm>();\n\n // ================================================================\n // Internal State\n // ================================================================\n\n /** The working configuration object. */\n public Config: ClusterConfig = DefaultClusterConfig();\n\n /** Filtered entity list for display (filtered by AvailableEntities). */\n public FilteredEntityOptions: ClusterConfigPanelEntityOption[] = [];\n\n /** Whether the panel body is currently visible. */\n public IsExpanded = true;\n\n /** Algorithm options for the dropdown. */\n public AlgorithmOptions: Array<{ Value: ClusterAlgorithm; Label: string }> = [\n { Value: 'kmeans', Label: 'K-Means' },\n { Value: 'dbscan', Label: 'DBSCAN' },\n ];\n\n /** Distance metric options for the dropdown. */\n public MetricOptions: Array<{ Value: ClusterDistanceMetric; Label: string }> = [\n { Value: 'cosine', Label: 'Cosine' },\n { Value: 'euclidean', Label: 'Euclidean' },\n { Value: 'dotproduct', Label: 'Dot Product' },\n ];\n\n // Dragging state\n /** Current panel top offset in pixels. */\n public PanelTop = 12;\n /** Current panel left offset in pixels. */\n public PanelLeft = 12;\n private isDragging = false;\n private dragStartX = 0;\n private dragStartY = 0;\n private dragStartTop = 0;\n private dragStartLeft = 0;\n private boundOnMouseMove: ((e: MouseEvent) => void) | null = null;\n private boundOnMouseUp: ((e: MouseEvent) => void) | null = null;\n\n @ViewChild('panelElement', { static: false }) private panelRef!: ElementRef<HTMLDivElement>;\n\n // ================================================================\n // Lifecycle\n // ================================================================\n\n ngOnInit(): void {\n // Apply defaults\n this.Config.Algorithm = this.DefaultAlgorithm;\n this.IsExpanded = !this.Collapsed;\n\n this.rebuildFilteredEntities();\n\n this.boundOnMouseMove = this.onMouseMove.bind(this);\n this.boundOnMouseUp = this.onMouseUp.bind(this);\n document.addEventListener('mousemove', this.boundOnMouseMove);\n document.addEventListener('mouseup', this.boundOnMouseUp);\n }\n\n ngOnDestroy(): void {\n if (this.boundOnMouseMove) document.removeEventListener('mousemove', this.boundOnMouseMove);\n if (this.boundOnMouseUp) document.removeEventListener('mouseup', this.boundOnMouseUp);\n }\n\n // ================================================================\n // Public Template Methods\n // ================================================================\n\n /**\n * Whether the current algorithm is K-Means (controls which\n * parameter sliders are shown).\n */\n public get IsKMeans(): boolean {\n return this.Config.Algorithm === 'kmeans';\n }\n\n /**\n * Handle algorithm dropdown change.\n *\n * @param value New algorithm value string.\n */\n public OnAlgorithmChanged(value: string): void {\n const newAlg = value as ClusterAlgorithm;\n this.Config.Algorithm = newAlg;\n this.AlgorithmChanged.emit(newAlg);\n this.emitConfigChanged();\n this.cdr.detectChanges();\n }\n\n /**\n * Handle distance metric dropdown change.\n *\n * @param value New metric value string.\n */\n public OnMetricChanged(value: string): void {\n this.Config.DistanceMetric = value as ClusterDistanceMetric;\n this.emitConfigChanged();\n }\n\n /**\n * Handle entity dropdown change.\n *\n * @param value New entity name.\n */\n public OnEntityChanged(value: string): void {\n this.Config.EntityName = value;\n this.emitConfigChanged();\n }\n\n /**\n * Handle changes to any numeric/text config field (K, Epsilon,\n * MinPoints, MaxRecords, Filter).\n */\n public OnFieldChanged(): void {\n this.emitConfigChanged();\n }\n\n /**\n * Handle Run button click. Fires `BeforeRunClustering`, and if not\n * canceled, emits `RunClustering`.\n */\n public OnRun(): void {\n if (!this.Config.EntityName || this.IsRunning) return;\n\n const snapshot = { ...this.Config };\n const cancelable: CancelableEvent<ClusterConfig> = { Data: snapshot, Cancel: false };\n this.BeforeRunClustering.emit(cancelable);\n if (cancelable.Cancel) return;\n\n this.RunClustering.emit(snapshot);\n }\n\n /**\n * Handle Save link click. Fires `BeforeSave`, and if not canceled,\n * emits `SaveVisualization`.\n */\n public OnSave(): void {\n const cancelable: CancelableEvent<ClusterConfig> = { Data: { ...this.Config }, Cancel: false };\n this.BeforeSave.emit(cancelable);\n if (cancelable.Cancel) return;\n\n this.SaveVisualization.emit();\n }\n\n /**\n * Toggle the panel between expanded and collapsed states.\n */\n public ToggleCollapse(): void {\n this.IsExpanded = !this.IsExpanded;\n this.cdr.detectChanges();\n }\n\n /**\n * Format a silhouette score to 2 decimal places.\n *\n * @param score The raw silhouette score.\n * @returns Formatted string (e.g., `\"0.72\"`).\n */\n public FormatSilhouette(score: number): string {\n return score.toFixed(2);\n }\n\n /**\n * Whether a silhouette score indicates good clustering quality.\n *\n * @param score The silhouette score to evaluate.\n * @returns `true` if score >= 0.5.\n */\n public IsSilhouetteGood(score: number): boolean {\n return score >= 0.5;\n }\n\n /**\n * Format a computation time in milliseconds to a human-readable string.\n *\n * @param ms Milliseconds.\n * @returns e.g., `\"1.2s\"` or `\"450ms\"`.\n */\n public FormatTime(ms: number): string {\n return ms >= 1000 ? `${(ms / 1000).toFixed(1)}s` : `${ms}ms`;\n }\n\n /**\n * Start dragging the panel via header mousedown.\n *\n * @param event The native mouse event.\n */\n public OnHeaderMouseDown(event: MouseEvent): void {\n event.preventDefault();\n this.isDragging = true;\n this.dragStartX = event.clientX;\n this.dragStartY = event.clientY;\n this.dragStartTop = this.PanelTop;\n this.dragStartLeft = this.PanelLeft;\n }\n\n /** @internal TrackBy for algorithm options. */\n public TrackAlgorithmBy(_index: number, item: { Value: string }): string {\n return item.Value;\n }\n\n /** @internal TrackBy for metric options. */\n public TrackMetricBy(_index: number, item: { Value: string }): string {\n return item.Value;\n }\n\n /** @internal TrackBy for entity options. */\n public TrackEntityBy(_index: number, item: ClusterConfigPanelEntityOption): string {\n return item.Name;\n }\n\n // ================================================================\n // Private Methods\n // ================================================================\n\n /**\n * Rebuild the filtered entity list based on `AvailableEntities`.\n */\n private rebuildFilteredEntities(): void {\n if (this.AvailableEntities.length > 0) {\n const allowedSet = new Set(this.AvailableEntities);\n this.FilteredEntityOptions = this.EntityOptions.filter(e => allowedSet.has(e.Name));\n } else {\n this.FilteredEntityOptions = this.EntityOptions;\n }\n\n if (this.FilteredEntityOptions.length > 0 && !this.Config.EntityName) {\n this.Config.EntityName = this.FilteredEntityOptions[0].Name;\n }\n }\n\n /** Emit `ConfigChanged` with a snapshot of the current config. */\n private emitConfigChanged(): void {\n this.ConfigChanged.emit({ ...this.Config });\n }\n\n private onMouseMove(event: MouseEvent): void {\n if (!this.isDragging) return;\n const dx = event.clientX - this.dragStartX;\n const dy = event.clientY - this.dragStartY;\n this.PanelTop = Math.max(0, this.dragStartTop + dy);\n this.PanelLeft = Math.max(0, this.dragStartLeft + dx);\n this.cdr.detectChanges();\n }\n\n private onMouseUp(_event: MouseEvent): void {\n this.isDragging = false;\n }\n}\n","<div #panelElement\n class=\"config-panel\"\n [style.top.px]=\"PanelTop\"\n [style.left.px]=\"PanelLeft\">\n\n <!-- Draggable header -->\n <h3 class=\"panel-header\"\n (mousedown)=\"OnHeaderMouseDown($event)\">\n <i class=\"fa-solid fa-sliders\"></i>\n Configuration\n <span class=\"header-actions\">\n <i class=\"fa-solid\"\n [class.fa-chevron-up]=\"IsExpanded\"\n [class.fa-chevron-down]=\"!IsExpanded\"\n (click)=\"ToggleCollapse(); $event.stopPropagation()\"\n title=\"Toggle panel\"></i>\n <i class=\"fa-solid fa-grip-dots-vertical drag-handle\"></i>\n </span>\n </h3>\n\n @if (IsExpanded) {\n <!-- Entity picker -->\n <div class=\"form-group\">\n <label>Entity</label>\n <select [ngModel]=\"Config.EntityName\"\n (ngModelChange)=\"OnEntityChanged($event)\">\n @for (entity of FilteredEntityOptions; track TrackEntityBy($index, entity)) {\n <option [value]=\"entity.Name\">{{ entity.Name }}</option>\n }\n </select>\n </div>\n\n <!-- Entity Document selector (only shown when 2+ docs for selected entity) -->\n @if (EntityDocOptions.length > 1) {\n <div class=\"form-group\">\n <label>Document Template</label>\n <select [ngModel]=\"Config.EntityDocumentID\"\n (ngModelChange)=\"Config.EntityDocumentID = $event; OnFieldChanged()\">\n @for (doc of EntityDocOptions; track doc.ID) {\n <option [value]=\"doc.ID\">{{ doc.Name }}</option>\n }\n </select>\n </div>\n }\n\n <!-- Filter -->\n <div class=\"form-group\">\n <label>Filter (optional)</label>\n <input type=\"text\"\n [(ngModel)]=\"Config.Filter\"\n (ngModelChange)=\"OnFieldChanged()\"\n placeholder=\"e.g. Status = 'Active'\">\n </div>\n\n <!-- Algorithm + K/Epsilon row -->\n <div class=\"form-row\">\n @if (ShowAlgorithmPicker) {\n <div class=\"form-group\">\n <label>Algorithm</label>\n <select [ngModel]=\"Config.Algorithm\"\n (ngModelChange)=\"OnAlgorithmChanged($event)\">\n @for (alg of AlgorithmOptions; track TrackAlgorithmBy($index, alg)) {\n <option [value]=\"alg.Value\">{{ alg.Label }}</option>\n }\n </select>\n </div>\n }\n\n @if (IsKMeans) {\n <div class=\"form-group\">\n <label>Clusters (K): {{ Config.K }}</label>\n <input type=\"range\"\n [ngModel]=\"Config.K\"\n (ngModelChange)=\"Config.K = $event; OnFieldChanged()\"\n [min]=\"2\"\n [max]=\"20\"\n [step]=\"1\">\n </div>\n } @else {\n <div class=\"form-group\">\n <label>Epsilon: {{ Config.Epsilon }}</label>\n <input type=\"range\"\n [ngModel]=\"Config.Epsilon\"\n (ngModelChange)=\"Config.Epsilon = $event; OnFieldChanged()\"\n [min]=\"0.05\"\n [max]=\"0.95\"\n [step]=\"0.05\">\n </div>\n }\n </div>\n\n <!-- DBSCAN MinPoints row (only visible for DBSCAN) -->\n @if (!IsKMeans) {\n <div class=\"form-group\">\n <label>Min Points: {{ Config.MinPoints }}</label>\n <input type=\"range\"\n [ngModel]=\"Config.MinPoints\"\n (ngModelChange)=\"Config.MinPoints = $event; OnFieldChanged()\"\n [min]=\"2\"\n [max]=\"20\"\n [step]=\"1\">\n </div>\n }\n\n <!-- Distance metric + Max records row -->\n <div class=\"form-row\">\n @if (ShowMetricPicker) {\n <div class=\"form-group\">\n <label>Distance Metric</label>\n <select [ngModel]=\"Config.DistanceMetric\"\n (ngModelChange)=\"OnMetricChanged($event)\">\n @for (metric of MetricOptions; track TrackMetricBy($index, metric)) {\n <option [value]=\"metric.Value\">{{ metric.Label }}</option>\n }\n </select>\n </div>\n }\n <div class=\"form-group\">\n <label>Max Records</label>\n <input type=\"number\"\n [(ngModel)]=\"Config.MaxRecords\"\n (ngModelChange)=\"OnFieldChanged()\"\n [min]=\"10\"\n [max]=\"5000\">\n </div>\n </div>\n\n <!-- Run button -->\n <button class=\"run-btn\"\n [disabled]=\"IsRunning || !Config.EntityName\"\n (click)=\"OnRun()\">\n @if (IsRunning) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Running...\n } @else {\n <i class=\"fa-solid fa-play\"></i> Run Clustering\n }\n </button>\n\n <!-- Metrics display -->\n @if (Metrics && Metrics.RecordCount > 0) {\n <div class=\"metrics-section\">\n <div class=\"metric-item\">\n <span class=\"metric-label\">Silhouette</span>\n <span class=\"metric-value\"\n [class.good]=\"IsSilhouetteGood(Metrics.SilhouetteScore)\">\n {{ FormatSilhouette(Metrics.SilhouetteScore) }}\n </span>\n </div>\n <div class=\"metric-item\">\n <span class=\"metric-label\">Clusters</span>\n <span class=\"metric-value\">{{ Metrics.ClusterCount }}</span>\n </div>\n <div class=\"metric-item\">\n <span class=\"metric-label\">Records</span>\n <span class=\"metric-value\">{{ Metrics.RecordCount }}</span>\n </div>\n <div class=\"metric-item\">\n <span class=\"metric-label\">Time</span>\n <span class=\"metric-value\">{{ FormatTime(Metrics.ComputationTimeMs) }}</span>\n </div>\n @if (Metrics.OutlierCount > 0) {\n <div class=\"metric-item\">\n <span class=\"metric-label\">Outliers</span>\n <span class=\"metric-value\">{{ Metrics.OutlierCount }}</span>\n </div>\n }\n </div>\n }\n\n <!-- Save link -->\n @if (ShowSaveButton) {\n <div class=\"save-link\" (click)=\"OnSave()\">\n <i class=\"fa-solid fa-bookmark\"></i> Save this visualization\n </div>\n }\n }\n</div>\n"]}
|
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview SVG scatter plot component for cluster visualization.
|
|
3
|
+
*
|
|
4
|
+
* `ClusterScatterComponent` renders an interactive 2D scatter plot where each
|
|
5
|
+
* dot represents a clustered entity record. It supports:
|
|
6
|
+
*
|
|
7
|
+
* - **Zoom / pan** via mouse wheel and drag (SVG viewBox manipulation)
|
|
8
|
+
* - **Tooltips** on hover showing point metadata
|
|
9
|
+
* - **Legend** overlay in the bottom-left corner
|
|
10
|
+
* - **Radial gradient glow** per cluster centroid
|
|
11
|
+
* - **Cancelable `BeforeXXX` events** so consumers can intercept interactions
|
|
12
|
+
* - **Programmatic selection and zoom** via public methods
|
|
13
|
+
* - **Full customization** of dot radius, opacity, color palette, and more
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <mj-cluster-scatter
|
|
18
|
+
* [Points]="result.Points"
|
|
19
|
+
* [Clusters]="result.Clusters"
|
|
20
|
+
* [DotRadius]="6"
|
|
21
|
+
* [ShowTooltip]="true"
|
|
22
|
+
* [ColorPalette]="['#ff0000','#00ff00','#0000ff']"
|
|
23
|
+
* (BeforePointClick)="onBeforeClick($event)"
|
|
24
|
+
* (PointClicked)="onPointClicked($event)"
|
|
25
|
+
* (AfterClusteringComplete)="onClustered($event)"
|
|
26
|
+
* (SelectionChanged)="onSelectionChanged($event)">
|
|
27
|
+
* </mj-cluster-scatter>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
import { EventEmitter, AfterViewInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
|
|
31
|
+
import { ClusterPoint, ClusterInfo, ClusterVisualizationResult, CancelableEvent, ViewportRect, ViewportTransform, ClusterSelectedEvent } from './clustering.types';
|
|
32
|
+
import * as i0 from "@angular/core";
|
|
33
|
+
export declare class ClusterScatterComponent implements AfterViewInit, OnDestroy, OnChanges {
|
|
34
|
+
private cdr;
|
|
35
|
+
/**
|
|
36
|
+
* Array of 2D-projected points to render.
|
|
37
|
+
*
|
|
38
|
+
* Each point carries its cluster assignment, label, and metadata.
|
|
39
|
+
* Typically produced by `ClusteringService.RunPipeline()`.
|
|
40
|
+
*/
|
|
41
|
+
Points: ClusterPoint[];
|
|
42
|
+
/**
|
|
43
|
+
* Cluster summary information used for the legend and color mapping.
|
|
44
|
+
*/
|
|
45
|
+
Clusters: ClusterInfo[];
|
|
46
|
+
/**
|
|
47
|
+
* When `true`, a semi-transparent loading overlay is displayed
|
|
48
|
+
* on top of the scatter plot.
|
|
49
|
+
*/
|
|
50
|
+
IsLoading: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Base radius (in SVG units) for each data point dot.
|
|
53
|
+
*
|
|
54
|
+
* @default 5
|
|
55
|
+
*/
|
|
56
|
+
DotRadius: number;
|
|
57
|
+
/**
|
|
58
|
+
* Base opacity for data point dots (0 to 1).
|
|
59
|
+
*
|
|
60
|
+
* When a point is hovered, non-hovered points are dimmed below this value.
|
|
61
|
+
*
|
|
62
|
+
* @default 0.75
|
|
63
|
+
*/
|
|
64
|
+
DotOpacity: number;
|
|
65
|
+
/**
|
|
66
|
+
* Radius used for the highlight ring on hovered or selected points.
|
|
67
|
+
*
|
|
68
|
+
* @default 8
|
|
69
|
+
*/
|
|
70
|
+
HighlightRadius: number;
|
|
71
|
+
/**
|
|
72
|
+
* Whether to show the color-coded cluster legend overlay.
|
|
73
|
+
*
|
|
74
|
+
* @default true
|
|
75
|
+
*/
|
|
76
|
+
ShowLegend: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Whether to show the tooltip popup on point hover.
|
|
79
|
+
*
|
|
80
|
+
* When `false`, `BeforePointHover` and `PointHovered` still fire but
|
|
81
|
+
* the built-in tooltip DOM is not rendered.
|
|
82
|
+
*
|
|
83
|
+
* @default true
|
|
84
|
+
*/
|
|
85
|
+
ShowTooltip: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Which metadata keys to display inside the tooltip.
|
|
88
|
+
*
|
|
89
|
+
* When empty (the default), **all** metadata keys are shown.
|
|
90
|
+
*
|
|
91
|
+
* @default []
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```html
|
|
95
|
+
* <mj-cluster-scatter [TooltipFields]="['EntityRecordID', 'Score']">
|
|
96
|
+
* </mj-cluster-scatter>
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
TooltipFields: string[];
|
|
100
|
+
/**
|
|
101
|
+
* Override the default cluster color palette.
|
|
102
|
+
*
|
|
103
|
+
* Colors are assigned to clusters by index: cluster 0 gets
|
|
104
|
+
* `ColorPalette[0]`, cluster 1 gets `ColorPalette[1]`, etc.
|
|
105
|
+
* Wraps around when there are more clusters than colors.
|
|
106
|
+
*
|
|
107
|
+
* @default CLUSTER_COLORS (10 accessible colors)
|
|
108
|
+
*/
|
|
109
|
+
ColorPalette: string[];
|
|
110
|
+
/**
|
|
111
|
+
* Enable or disable zoom via mouse wheel.
|
|
112
|
+
*
|
|
113
|
+
* @default true
|
|
114
|
+
*/
|
|
115
|
+
EnableZoom: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Enable or disable panning via click-and-drag.
|
|
118
|
+
*
|
|
119
|
+
* @default true
|
|
120
|
+
*/
|
|
121
|
+
EnablePan: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Whether scatter plot transitions (zoom, highlight) should be animated.
|
|
124
|
+
*
|
|
125
|
+
* @default true
|
|
126
|
+
*/
|
|
127
|
+
AnimateTransitions: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Externally controlled set of selected point IDs (by `VectorKey`).
|
|
130
|
+
*
|
|
131
|
+
* When provided, the component renders selection rings for matching
|
|
132
|
+
* points and emits `SelectionChanged` when the user modifies the set
|
|
133
|
+
* interactively.
|
|
134
|
+
*
|
|
135
|
+
* @default (empty Set)
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```html
|
|
139
|
+
* <mj-cluster-scatter
|
|
140
|
+
* [SelectedPointIds]="mySelectedIds"
|
|
141
|
+
* (SelectionChanged)="mySelectedIds = $event">
|
|
142
|
+
* </mj-cluster-scatter>
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
SelectedPointIds: Set<string>;
|
|
146
|
+
/**
|
|
147
|
+
* Minimum zoom level (smallest allowed viewBox multiplier).
|
|
148
|
+
*
|
|
149
|
+
* A value of `0.5` means the user can zoom in until the viewBox is
|
|
150
|
+
* half of the default 1000x700 size.
|
|
151
|
+
*
|
|
152
|
+
* @default 0.5
|
|
153
|
+
*/
|
|
154
|
+
MinZoom: number;
|
|
155
|
+
/**
|
|
156
|
+
* Maximum zoom level (largest allowed viewBox multiplier).
|
|
157
|
+
*
|
|
158
|
+
* A value of `10` means the user can zoom out until the viewBox is
|
|
159
|
+
* 10x the default 1000x700 size.
|
|
160
|
+
*
|
|
161
|
+
* @default 10
|
|
162
|
+
*/
|
|
163
|
+
MaxZoom: number;
|
|
164
|
+
/**
|
|
165
|
+
* Emitted when a point is clicked (after `BeforePointClick` completes
|
|
166
|
+
* without cancellation).
|
|
167
|
+
*/
|
|
168
|
+
PointClicked: EventEmitter<ClusterPoint>;
|
|
169
|
+
/**
|
|
170
|
+
* Emitted when the user clicks "Open Record" in the detail panel.
|
|
171
|
+
* The parent should wire this to `NavigationService.OpenEntityRecord()`.
|
|
172
|
+
*/
|
|
173
|
+
OpenRecordRequested: EventEmitter<ClusterPoint>;
|
|
174
|
+
/**
|
|
175
|
+
* Emitted when the mouse enters or leaves a data point.
|
|
176
|
+
* Emits `null` on mouse-leave.
|
|
177
|
+
*/
|
|
178
|
+
PointHovered: EventEmitter<ClusterPoint>;
|
|
179
|
+
/**
|
|
180
|
+
* Fires **before** `PointClicked`. Set `event.Cancel = true` to
|
|
181
|
+
* suppress the click entirely.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```typescript
|
|
185
|
+
* onBeforeClick(event: CancelableEvent<ClusterPoint>): void {
|
|
186
|
+
* if (event.Data.ClusterId === -1) {
|
|
187
|
+
* event.Cancel = true; // ignore outlier clicks
|
|
188
|
+
* }
|
|
189
|
+
* }
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
BeforePointClick: EventEmitter<CancelableEvent<ClusterPoint>>;
|
|
193
|
+
/**
|
|
194
|
+
* Fires **before** the tooltip is shown on hover. Set
|
|
195
|
+
* `event.Cancel = true` to suppress the tooltip for this point.
|
|
196
|
+
*/
|
|
197
|
+
BeforePointHover: EventEmitter<CancelableEvent<ClusterPoint>>;
|
|
198
|
+
/**
|
|
199
|
+
* Fires **before** a zoom or pan operation is applied. Set
|
|
200
|
+
* `event.Cancel = true` to reject the viewport change.
|
|
201
|
+
*
|
|
202
|
+
* The payload contains the **proposed** viewport rectangle.
|
|
203
|
+
*/
|
|
204
|
+
BeforeZoom: EventEmitter<CancelableEvent<ViewportRect>>;
|
|
205
|
+
/**
|
|
206
|
+
* Fires after new `Points` and `Clusters` are received and centroids
|
|
207
|
+
* have been computed, delivering the full visualization result.
|
|
208
|
+
*/
|
|
209
|
+
AfterClusteringComplete: EventEmitter<ClusterVisualizationResult>;
|
|
210
|
+
/**
|
|
211
|
+
* Fires when the user clicks a cluster label or legend swatch.
|
|
212
|
+
*/
|
|
213
|
+
ClusterSelected: EventEmitter<ClusterSelectedEvent>;
|
|
214
|
+
/**
|
|
215
|
+
* Fires whenever the set of selected point IDs changes
|
|
216
|
+
* (via user click or programmatic `SelectPoints` / `ClearSelection`).
|
|
217
|
+
*/
|
|
218
|
+
SelectionChanged: EventEmitter<Set<string>>;
|
|
219
|
+
/**
|
|
220
|
+
* Fires after every zoom or pan that changes the visible viewport.
|
|
221
|
+
*/
|
|
222
|
+
ViewportChanged: EventEmitter<ViewportRect>;
|
|
223
|
+
/** SVG viewBox parameters: [minX, minY, width, height]. */
|
|
224
|
+
ViewBox: number[];
|
|
225
|
+
/** Get the current viewport transform for saving/restoring. */
|
|
226
|
+
GetViewportTransform(): ViewportTransform;
|
|
227
|
+
/** Restore a previously saved viewport transform. */
|
|
228
|
+
SetViewportTransform(vt: ViewportTransform): void;
|
|
229
|
+
/** Currently hovered point (null when idle). */
|
|
230
|
+
HoveredPoint: ClusterPoint | null;
|
|
231
|
+
/** Screen-space tooltip X position. */
|
|
232
|
+
TooltipX: number;
|
|
233
|
+
/** Screen-space tooltip Y position. */
|
|
234
|
+
TooltipY: number;
|
|
235
|
+
/** Currently highlighted (single-clicked) point key. */
|
|
236
|
+
HighlightedKey: string | null;
|
|
237
|
+
/** Background grid lines for visual orientation. */
|
|
238
|
+
HorizontalGridLines: number[];
|
|
239
|
+
/** Background vertical grid lines. */
|
|
240
|
+
VerticalGridLines: number[];
|
|
241
|
+
/** Computed cluster centroids used for radial glow effects. */
|
|
242
|
+
ClusterCentroids: Array<{
|
|
243
|
+
ClusterId: number;
|
|
244
|
+
Cx: number;
|
|
245
|
+
Cy: number;
|
|
246
|
+
R: number;
|
|
247
|
+
Color: string;
|
|
248
|
+
}>;
|
|
249
|
+
/** Filtered metadata entries for the tooltip (computed on hover). */
|
|
250
|
+
TooltipEntries: Array<{
|
|
251
|
+
Key: string;
|
|
252
|
+
Value: unknown;
|
|
253
|
+
}>;
|
|
254
|
+
/** The currently selected point shown in the detail panel. */
|
|
255
|
+
SelectedPoint: ClusterPoint | null;
|
|
256
|
+
/** Whether the detail panel is visible. */
|
|
257
|
+
ShowDetailPanel: boolean;
|
|
258
|
+
/** Metadata entries for the detail panel (computed on selection). */
|
|
259
|
+
DetailEntries: Array<{
|
|
260
|
+
Key: string;
|
|
261
|
+
Value: unknown;
|
|
262
|
+
}>;
|
|
263
|
+
/** Cluster members for the selected point's cluster. */
|
|
264
|
+
ClusterMembers: ClusterPoint[];
|
|
265
|
+
/** Whether the cluster members list is expanded. */
|
|
266
|
+
ClusterMembersExpanded: boolean;
|
|
267
|
+
private svgRef;
|
|
268
|
+
private isPanning;
|
|
269
|
+
private panStartX;
|
|
270
|
+
private panStartY;
|
|
271
|
+
private panStartViewBox;
|
|
272
|
+
private boundOnMouseMove;
|
|
273
|
+
private boundOnMouseUp;
|
|
274
|
+
/** Default viewBox dimensions used for zoom-limit calculations. */
|
|
275
|
+
private readonly defaultWidth;
|
|
276
|
+
private readonly defaultHeight;
|
|
277
|
+
ngAfterViewInit(): void;
|
|
278
|
+
ngOnDestroy(): void;
|
|
279
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
280
|
+
/**
|
|
281
|
+
* Returns the current SVG `viewBox` as a space-separated string.
|
|
282
|
+
*
|
|
283
|
+
* @returns e.g. `"0 0 1000 700"`
|
|
284
|
+
*/
|
|
285
|
+
GetViewBoxString(): string;
|
|
286
|
+
/**
|
|
287
|
+
* Resolve the display color for a given point based on its cluster
|
|
288
|
+
* assignment and the active `ColorPalette`.
|
|
289
|
+
*
|
|
290
|
+
* @param point The point to colorize.
|
|
291
|
+
* @returns CSS color string.
|
|
292
|
+
*/
|
|
293
|
+
GetPointColor(point: ClusterPoint): string;
|
|
294
|
+
/**
|
|
295
|
+
* Compute the SVG radius for a data point.
|
|
296
|
+
*
|
|
297
|
+
* Selected points use the larger `HighlightRadius`; all others use `DotRadius`.
|
|
298
|
+
*
|
|
299
|
+
* @param point The point to size.
|
|
300
|
+
* @returns Radius in SVG units.
|
|
301
|
+
*/
|
|
302
|
+
GetPointRadius(point: ClusterPoint): number;
|
|
303
|
+
/**
|
|
304
|
+
* Compute the fill opacity for a data point.
|
|
305
|
+
*
|
|
306
|
+
* Non-hovered points are dimmed when another point is hovered.
|
|
307
|
+
*
|
|
308
|
+
* @param point The point to evaluate.
|
|
309
|
+
* @returns Opacity value between 0 and 1.
|
|
310
|
+
*/
|
|
311
|
+
GetPointOpacity(point: ClusterPoint): number;
|
|
312
|
+
/**
|
|
313
|
+
* Handle mouseenter on a data point: show tooltip, fire hover events.
|
|
314
|
+
*
|
|
315
|
+
* @param point The hovered point.
|
|
316
|
+
* @param event The native mouse event (used for tooltip positioning).
|
|
317
|
+
*/
|
|
318
|
+
OnPointMouseEnter(point: ClusterPoint, event: MouseEvent): void;
|
|
319
|
+
/**
|
|
320
|
+
* Handle mouseleave on a data point: hide tooltip, emit null hover.
|
|
321
|
+
*/
|
|
322
|
+
OnPointMouseLeave(): void;
|
|
323
|
+
/**
|
|
324
|
+
* Handle click on a data point: fires `BeforePointClick`, toggles
|
|
325
|
+
* selection, opens the detail panel, then fires `PointClicked` and
|
|
326
|
+
* `SelectionChanged`.
|
|
327
|
+
*
|
|
328
|
+
* @param point The clicked point.
|
|
329
|
+
*/
|
|
330
|
+
OnPointClick(point: ClusterPoint): void;
|
|
331
|
+
/**
|
|
332
|
+
* Whether the given point is the currently highlighted (last-clicked) point.
|
|
333
|
+
*
|
|
334
|
+
* @param point The point to check.
|
|
335
|
+
* @returns `true` if highlighted.
|
|
336
|
+
*/
|
|
337
|
+
IsHighlighted(point: ClusterPoint): boolean;
|
|
338
|
+
/**
|
|
339
|
+
* Whether the given point is in the current selection set.
|
|
340
|
+
*
|
|
341
|
+
* @param point The point to check.
|
|
342
|
+
* @returns `true` if selected.
|
|
343
|
+
*/
|
|
344
|
+
IsSelected(point: ClusterPoint): boolean;
|
|
345
|
+
/**
|
|
346
|
+
* Handle mouse wheel events for zooming.
|
|
347
|
+
*
|
|
348
|
+
* Fires `BeforeZoom` and `ViewportChanged`. Respects `EnableZoom`,
|
|
349
|
+
* `MinZoom`, and `MaxZoom` constraints.
|
|
350
|
+
*
|
|
351
|
+
* @param event The native wheel event.
|
|
352
|
+
*/
|
|
353
|
+
OnWheel(event: WheelEvent): void;
|
|
354
|
+
/**
|
|
355
|
+
* Start panning on left-mousedown.
|
|
356
|
+
*
|
|
357
|
+
* @param event The native mouse event.
|
|
358
|
+
*/
|
|
359
|
+
OnMouseDown(event: MouseEvent): void;
|
|
360
|
+
/**
|
|
361
|
+
* Handle a click on a cluster legend item.
|
|
362
|
+
*
|
|
363
|
+
* @param cluster The cluster that was clicked.
|
|
364
|
+
*/
|
|
365
|
+
OnClusterLegendClick(cluster: ClusterInfo): void;
|
|
366
|
+
/**
|
|
367
|
+
* Resolve the human-readable label for a point's cluster.
|
|
368
|
+
*
|
|
369
|
+
* @param point The point to look up.
|
|
370
|
+
* @returns Cluster label string, or `"Outlier"` for noise points.
|
|
371
|
+
*/
|
|
372
|
+
GetClusterLabel(point: ClusterPoint): string;
|
|
373
|
+
/** Get the label for a cluster by ID (used for SVG text labels on the chart). */
|
|
374
|
+
GetClusterLabelById(clusterId: number): string;
|
|
375
|
+
/** @internal TrackBy function for point loops. */
|
|
376
|
+
TrackPointBy(_index: number, point: ClusterPoint): string;
|
|
377
|
+
/** @internal TrackBy function for cluster loops. */
|
|
378
|
+
TrackClusterBy(_index: number, cluster: ClusterInfo): number;
|
|
379
|
+
/** @internal TrackBy function for centroid loops. */
|
|
380
|
+
TrackCentroidBy(_index: number, centroid: {
|
|
381
|
+
ClusterId: number;
|
|
382
|
+
}): number;
|
|
383
|
+
/**
|
|
384
|
+
* Animate the viewport to center on a specific cluster's centroid.
|
|
385
|
+
*
|
|
386
|
+
* The zoom level is adjusted so that all cluster members are visible
|
|
387
|
+
* with some padding.
|
|
388
|
+
*
|
|
389
|
+
* @param clusterId The numeric ID of the cluster to zoom into.
|
|
390
|
+
*
|
|
391
|
+
* @example
|
|
392
|
+
* ```typescript
|
|
393
|
+
* @ViewChild(ClusterScatterComponent) scatter!: ClusterScatterComponent;
|
|
394
|
+
* this.scatter.ZoomToCluster(2);
|
|
395
|
+
* ```
|
|
396
|
+
*/
|
|
397
|
+
ZoomToCluster(clusterId: number): void;
|
|
398
|
+
/**
|
|
399
|
+
* Reset the viewport to the default zoom level (full view).
|
|
400
|
+
*
|
|
401
|
+
* @example
|
|
402
|
+
* ```typescript
|
|
403
|
+
* this.scatter.ResetZoom();
|
|
404
|
+
* ```
|
|
405
|
+
*/
|
|
406
|
+
ResetZoom(): void;
|
|
407
|
+
/**
|
|
408
|
+
* Return all points currently visible within the viewport bounds.
|
|
409
|
+
*
|
|
410
|
+
* @returns Array of `ClusterPoint` objects whose X/Y fall inside the
|
|
411
|
+
* current viewBox.
|
|
412
|
+
*/
|
|
413
|
+
GetVisiblePoints(): ClusterPoint[];
|
|
414
|
+
/**
|
|
415
|
+
* Programmatically select points by their `VectorKey` IDs.
|
|
416
|
+
*
|
|
417
|
+
* Merges with the existing selection. Use `ClearSelection()` first
|
|
418
|
+
* to replace the selection entirely.
|
|
419
|
+
*
|
|
420
|
+
* @param ids Array of `VectorKey` strings to select.
|
|
421
|
+
*
|
|
422
|
+
* @example
|
|
423
|
+
* ```typescript
|
|
424
|
+
* this.scatter.SelectPoints(['abc-123', 'def-456']);
|
|
425
|
+
* ```
|
|
426
|
+
*/
|
|
427
|
+
SelectPoints(ids: string[]): void;
|
|
428
|
+
/**
|
|
429
|
+
* Clear all selected points.
|
|
430
|
+
*/
|
|
431
|
+
ClearSelection(): void;
|
|
432
|
+
/**
|
|
433
|
+
* Export the current scatter plot as an SVG string.
|
|
434
|
+
*
|
|
435
|
+
* The returned string is a self-contained `<svg>` element that can be
|
|
436
|
+
* saved to a file or embedded in HTML.
|
|
437
|
+
*
|
|
438
|
+
* @returns SVG markup string, or empty string if the SVG element is
|
|
439
|
+
* not yet rendered.
|
|
440
|
+
*/
|
|
441
|
+
ExportSVG(): string;
|
|
442
|
+
/**
|
|
443
|
+
* Visually emphasize all points belonging to a cluster by increasing
|
|
444
|
+
* their radius and dimming non-members.
|
|
445
|
+
*
|
|
446
|
+
* Call `ResetZoom()` or re-assign `Points` to clear the highlight.
|
|
447
|
+
*
|
|
448
|
+
* @param clusterId The numeric cluster ID to emphasize.
|
|
449
|
+
*/
|
|
450
|
+
HighlightCluster(clusterId: number): void;
|
|
451
|
+
/**
|
|
452
|
+
* Close the detail panel.
|
|
453
|
+
*/
|
|
454
|
+
CloseDetailPanel(): void;
|
|
455
|
+
/**
|
|
456
|
+
* Emit the `OpenRecordRequested` event for the currently selected point
|
|
457
|
+
* (triggered by the "Open Record" button in the detail panel).
|
|
458
|
+
*/
|
|
459
|
+
OnOpenRecordClick(): void;
|
|
460
|
+
/**
|
|
461
|
+
* Select a point from the cluster members list, updating the detail
|
|
462
|
+
* panel and highlighting the point on the chart.
|
|
463
|
+
*
|
|
464
|
+
* @param point The cluster member point to select.
|
|
465
|
+
*/
|
|
466
|
+
OnClusterMemberClick(point: ClusterPoint): void;
|
|
467
|
+
/**
|
|
468
|
+
* Toggle the cluster members list expansion state.
|
|
469
|
+
*/
|
|
470
|
+
ToggleClusterMembers(): void;
|
|
471
|
+
/**
|
|
472
|
+
* Get the color for a cluster by its ID, used in the detail panel.
|
|
473
|
+
*
|
|
474
|
+
* @param clusterId The cluster ID.
|
|
475
|
+
* @returns CSS color string.
|
|
476
|
+
*/
|
|
477
|
+
GetClusterColor(clusterId: number): string;
|
|
478
|
+
/**
|
|
479
|
+
* Return the metadata keys that should be hidden in the detail panel.
|
|
480
|
+
*/
|
|
481
|
+
private get internalMetadataKeys();
|
|
482
|
+
/**
|
|
483
|
+
* Select a point and populate the detail panel state.
|
|
484
|
+
*/
|
|
485
|
+
private selectPointForDetail;
|
|
486
|
+
/**
|
|
487
|
+
* Compute the metadata entries for the detail panel, excluding internal fields.
|
|
488
|
+
*/
|
|
489
|
+
private computeDetailEntries;
|
|
490
|
+
/**
|
|
491
|
+
* Compute the list of cluster members for the selected point's cluster.
|
|
492
|
+
*/
|
|
493
|
+
private computeClusterMembers;
|
|
494
|
+
/** @internal TrackBy function for cluster member loops. */
|
|
495
|
+
TrackMemberBy(_index: number, point: ClusterPoint): string;
|
|
496
|
+
private onMouseMove;
|
|
497
|
+
private onMouseUp;
|
|
498
|
+
private computeCentroids;
|
|
499
|
+
/**
|
|
500
|
+
* Compute the bounding box for a set of points.
|
|
501
|
+
*/
|
|
502
|
+
private computeBounds;
|
|
503
|
+
/**
|
|
504
|
+
* Resolve the effective color palette (custom override or default).
|
|
505
|
+
*/
|
|
506
|
+
private getActivePalette;
|
|
507
|
+
/**
|
|
508
|
+
* Compute the tooltip entries based on TooltipFields filter.
|
|
509
|
+
*/
|
|
510
|
+
private computeTooltipEntries;
|
|
511
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClusterScatterComponent, never>;
|
|
512
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClusterScatterComponent, "mj-cluster-scatter", never, { "Points": { "alias": "Points"; "required": false; }; "Clusters": { "alias": "Clusters"; "required": false; }; "IsLoading": { "alias": "IsLoading"; "required": false; }; "DotRadius": { "alias": "DotRadius"; "required": false; }; "DotOpacity": { "alias": "DotOpacity"; "required": false; }; "HighlightRadius": { "alias": "HighlightRadius"; "required": false; }; "ShowLegend": { "alias": "ShowLegend"; "required": false; }; "ShowTooltip": { "alias": "ShowTooltip"; "required": false; }; "TooltipFields": { "alias": "TooltipFields"; "required": false; }; "ColorPalette": { "alias": "ColorPalette"; "required": false; }; "EnableZoom": { "alias": "EnableZoom"; "required": false; }; "EnablePan": { "alias": "EnablePan"; "required": false; }; "AnimateTransitions": { "alias": "AnimateTransitions"; "required": false; }; "SelectedPointIds": { "alias": "SelectedPointIds"; "required": false; }; "MinZoom": { "alias": "MinZoom"; "required": false; }; "MaxZoom": { "alias": "MaxZoom"; "required": false; }; }, { "PointClicked": "PointClicked"; "OpenRecordRequested": "OpenRecordRequested"; "PointHovered": "PointHovered"; "BeforePointClick": "BeforePointClick"; "BeforePointHover": "BeforePointHover"; "BeforeZoom": "BeforeZoom"; "AfterClusteringComplete": "AfterClusteringComplete"; "ClusterSelected": "ClusterSelected"; "SelectionChanged": "SelectionChanged"; "ViewportChanged": "ViewportChanged"; }, never, never, false, never>;
|
|
513
|
+
}
|
|
514
|
+
//# sourceMappingURL=cluster-scatter.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cluster-scatter.component.d.ts","sourceRoot":"","sources":["../../src/lib/cluster-scatter.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAIH,YAAY,EAGZ,aAAa,EACb,SAAS,EACT,SAAS,EACT,aAAa,EAIhB,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,YAAY,EACZ,WAAW,EACX,0BAA0B,EAC1B,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EAEvB,MAAM,oBAAoB,CAAC;;AAE5B,qBAOa,uBAAwB,YAAW,aAAa,EAAE,SAAS,EAAE,SAAS;IAC/E,OAAO,CAAC,GAAG,CAA6B;IAMxC;;;;;OAKG;IACM,MAAM,EAAE,YAAY,EAAE,CAAM;IAErC;;OAEG;IACM,QAAQ,EAAE,WAAW,EAAE,CAAM;IAEtC;;;OAGG;IACM,SAAS,UAAS;IAM3B;;;;OAIG;IACM,SAAS,SAAK;IAEvB;;;;;;OAMG;IACM,UAAU,SAAQ;IAE3B;;;;OAIG;IACM,eAAe,SAAK;IAE7B;;;;OAIG;IACM,UAAU,UAAQ;IAE3B;;;;;;;OAOG;IACM,WAAW,UAAQ;IAE5B;;;;;;;;;;;;OAYG;IACM,aAAa,EAAE,MAAM,EAAE,CAAM;IAEtC;;;;;;;;OAQG;IACM,YAAY,EAAE,MAAM,EAAE,CAAM;IAErC;;;;OAIG;IACM,UAAU,UAAQ;IAE3B;;;;OAIG;IACM,SAAS,UAAQ;IAE1B;;;;OAIG;IACM,kBAAkB,UAAQ;IAEnC;;;;;;;;;;;;;;;;OAgBG;IACM,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAqB;IAE3D;;;;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