UNPKG

@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.

60 lines (59 loc) 2.81 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Directive, TemplateRef, Optional } from '@angular/core'; import * as i0 from "@angular/core"; /** * Represents a directive that selects a [template](link:site.data.urls.angular['templatesyntax']) * within the `<kendo-chart-tooltip>` component for the * [series tooltip](slug:tooltips_chart_charts#toc-specifying-a-template). * The following context fields are frequently utilized: * - `let-category="category"`&mdash;The category name. * - `let-dataItem="dataItem"`&mdash;The original data item used to construct the point. It will be `null` if binding to an array. * - `let-series="series"`&mdash;The data series. * - `let-value="value"`&mdash;The value of the point (either a number or an object). * For the full list of available fields, refer to the [`TooltipTemplatePoint`](slug:api_charts_tooltiptemplatepoint). * * @example * ```ts * import { Component } from '@angular/core'; * * _@Component({ * selector: 'my-app', * template: ` * <kendo-chart> * <kendo-chart-tooltip> * <ng-template kendoChartSeriesTooltipTemplate let-value="value"> * Value is {{value}} * </ng-template> * </kendo-chart-tooltip> * <kendo-chart-series> * <kendo-chart-series-item [data]="[1, 2, 3]"> * </kendo-chart-series-item> * </kendo-chart-series> * </kendo-chart> * ` * }) * class AppComponent { * } * * ``` */ export class SeriesTooltipTemplateDirective { templateRef; constructor(templateRef) { this.templateRef = templateRef; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SeriesTooltipTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: SeriesTooltipTemplateDirective, isStandalone: true, selector: "[kendoChartSeriesTooltipTemplate]", ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SeriesTooltipTemplateDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoChartSeriesTooltipTemplate]', standalone: true }] }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{ type: Optional }] }] });