@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.
66 lines (65 loc) • 3.36 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2024 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Component, Input, ViewChild, TemplateRef } from '@angular/core';
import { BaseTooltip } from './base-tooltip';
import { PopupService, POPUP_CONTAINER } from '@progress/kendo-angular-popup';
import { LocalizationService } from '@progress/kendo-angular-l10n';
import { bodyFactory } from './body-factory';
import { NgStyle } from '@angular/common';
import * as i0 from "@angular/core";
import * as i1 from "@progress/kendo-angular-popup";
import * as i2 from "@progress/kendo-angular-l10n";
/**
* @hidden
*/
export class CrosshairTooltipComponent extends BaseTooltip {
templateRef;
key;
value;
animate = false;
constructor(popupService, localizationService) {
super(popupService, localizationService);
}
show(e) {
super.show(e);
this.value = e.value;
this.popupRef.popup.changeDetectorRef.detectChanges();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CrosshairTooltipComponent, deps: [{ token: i1.PopupService }, { token: i2.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CrosshairTooltipComponent, isStandalone: true, selector: "kendo-chart-crosshair-tooltip", inputs: { key: "key" }, providers: [PopupService, {
provide: POPUP_CONTAINER,
useFactory: bodyFactory
}], viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["content"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
<ng-template #content>
<div class="k-chart-tooltip k-chart-crosshair-tooltip" [ngStyle]="style">
{{ value }}
</div>
</ng-template>
`, isInline: true, dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CrosshairTooltipComponent, decorators: [{
type: Component,
args: [{
providers: [PopupService, {
provide: POPUP_CONTAINER,
useFactory: bodyFactory
}],
selector: 'kendo-chart-crosshair-tooltip',
template: `
<ng-template #content>
<div class="k-chart-tooltip k-chart-crosshair-tooltip" [ngStyle]="style">
{{ value }}
</div>
</ng-template>
`,
standalone: true,
imports: [NgStyle]
}]
}], ctorParameters: function () { return [{ type: i1.PopupService }, { type: i2.LocalizationService }]; }, propDecorators: { templateRef: [{
type: ViewChild,
args: ['content', { static: true }]
}], key: [{
type: Input
}] } });