@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.
83 lines (82 loc) • 3.59 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 { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { ConfigurationService } from '../../common/configuration.service';
import { SettingsComponent } from '../../common/settings.component';
import * as i0 from "@angular/core";
import * as i1 from "../../common/configuration.service";
/**
* Represents the crosshair configuration options of the X axis
* ([see example]({% slug api_charts_xaxiscomponent %})).
*
* @example
* ```html
* <kendo-chart>
* <kendo-chart-x-axis>
* <kendo-chart-x-axis-item>
* <kendo-chart-x-axis-item-crosshair [visible]="true" color="#ff0000" [width]="2">
* <kendo-chart-x-axis-item-crosshair-tooltip format="c"></kendo-chart-x-axis-item-crosshair-tooltip>
* </kendo-chart-x-axis-item-crosshair>
* </kendo-chart-x-axis-item>
* </kendo-chart-x-axis>
* </kendo-chart>
* ```
*
* @remarks
* Supported children components are: {@link XAxisCrosshairTooltipComponent}.
*/
export class XAxisCrosshairComponent extends SettingsComponent {
configurationService;
/**
* Specifies the color of the crosshair.
*/
color;
/**
* Specifies the opacity of the crosshair. By default, the crosshair is opaque.
* @default 1
*/
opacity;
/**
* Determines whether the Chart displays the X-axis crosshair of the Scatter Chart.
* @default false
*/
visible;
/**
* Specifies the width of the crosshair in pixels.
* @default 1
*/
width;
// These options are also available as child components
/**
* Specifies the tooltip configuration of the crosshair.
*/
tooltip;
constructor(configurationService) {
super('crosshair', configurationService);
this.configurationService = configurationService;
this.markAsVisible();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: XAxisCrosshairComponent, deps: [{ token: i1.ConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: XAxisCrosshairComponent, isStandalone: true, selector: "kendo-chart-x-axis-item-crosshair", inputs: { color: "color", opacity: "opacity", visible: "visible", width: "width", tooltip: "tooltip" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: XAxisCrosshairComponent, decorators: [{
type: Component,
args: [{
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'kendo-chart-x-axis-item-crosshair',
template: '',
standalone: true
}]
}], ctorParameters: () => [{ type: i1.ConfigurationService }], propDecorators: { color: [{
type: Input
}], opacity: [{
type: Input
}], visible: [{
type: Input
}], width: [{
type: Input
}], tooltip: [{
type: Input
}] } });