@progress/kendo-angular-charts
Version:
Kendo UI Charts for Angular - A comprehensive package for creating beautiful and interactive data visualization. Every chart type, stock charts, and sparklines are included.
81 lines (80 loc) • 4.1 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Component, ContentChild, Input } from '@angular/core';
import { ConfigurationService } from '../common/configuration.service';
import { SettingsComponent } from '../common/settings.component';
import { SankeyLinkTooltipTemplateDirective } from './tooltip/link-tooltip-template.directive';
import { SankeyNodeTooltipTemplateDirective } from './tooltip/node-tooltip-template.directive';
import { SankeyTooltipTemplateService } from './tooltip/tooltip-template.service';
import * as i0 from "@angular/core";
import * as i1 from "../common/configuration.service";
import * as i2 from "./tooltip/tooltip-template.service";
/**
* The configuration options of the Sankey tooltip
* ([see example]({% slug tooltip_sankey %})).
*/
export class SankeyTooltipComponent extends SettingsComponent {
configurationService;
templateService;
/**
* Indicates whether the tooltip will follow the mouse pointer.
*
* @default false
*/
followPointer;
/**
* Represents the delay of the tooltip displaying.
* The delay is measured in milliseconds.
*
* @default 100
*/
delay;
/**
* The distance between the tooltip and the mouse pointer in pixels.
* @default 12
*/
offset;
/**
* If set to `true`, the Sankey displays the link and node tooltips.
* @default false
*/
visible;
linkTooltipTemplate;
nodeTooltipTemplate;
constructor(configurationService, templateService) {
super('tooltip', configurationService);
this.configurationService = configurationService;
this.templateService = templateService;
this.markAsVisible();
}
ngAfterContentChecked() {
this.templateService.linkTemplate = this.linkTooltipTemplate?.templateRef;
this.templateService.nodeTemplate = this.nodeTooltipTemplate?.templateRef;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SankeyTooltipComponent, deps: [{ token: i1.ConfigurationService }, { token: i2.SankeyTooltipTemplateService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SankeyTooltipComponent, isStandalone: true, selector: "kendo-sankey-tooltip", inputs: { followPointer: "followPointer", delay: "delay", offset: "offset", visible: "visible" }, queries: [{ propertyName: "linkTooltipTemplate", first: true, predicate: SankeyLinkTooltipTemplateDirective, descendants: true }, { propertyName: "nodeTooltipTemplate", first: true, predicate: SankeyNodeTooltipTemplateDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SankeyTooltipComponent, decorators: [{
type: Component,
args: [{
selector: 'kendo-sankey-tooltip',
template: '',
standalone: true
}]
}], ctorParameters: function () { return [{ type: i1.ConfigurationService }, { type: i2.SankeyTooltipTemplateService }]; }, propDecorators: { followPointer: [{
type: Input
}], delay: [{
type: Input
}], offset: [{
type: Input
}], visible: [{
type: Input
}], linkTooltipTemplate: [{
type: ContentChild,
args: [SankeyLinkTooltipTemplateDirective, { static: false }]
}], nodeTooltipTemplate: [{
type: ContentChild,
args: [SankeyNodeTooltipTemplateDirective, { static: false }]
}] } });