UNPKG

ag-charts-community

Version:

Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue

43 lines (42 loc) 1.64 kB
import type { AgBaseCrossLineLabelOptions, AgCrossLineLabelPosition } from 'ag-charts-types'; import type { Scale } from '../../scale/scale'; import type { Group } from '../../scene/group'; import type { TimeInterval } from '../../util/time'; import type { ChartAxisDirection } from '../chartAxisDirection'; export type CrossLineType = 'line' | 'range'; export declare const MATCHING_CROSSLINE_TYPE: (property: 'value' | 'range') => import("../../util/validation").ValidatePredicate; export declare function getCrossLineValue(crossLine: { type: CrossLineType; value?: unknown; range?: [unknown, unknown]; }): unknown; export declare function validateCrossLineValue(value: unknown, scale: Scale<any, number>): boolean; export interface CrossLine<LabelType = AgBaseCrossLineLabelOptions> { calculateLayout?(visible: boolean, reversedAxis?: boolean): void; calculatePadding?(padding: Partial<Record<AgCrossLineLabelPosition, number>>): void; clippedRange: [number, number]; direction: ChartAxisDirection; enabled?: boolean; defaultColorRange: string[]; fill?: string; fillOpacity?: number; gridLength: number; lineGroup: Group; rangeGroup: Group; id: string; label: LabelType; labelGroup: Group; lineDash?: number[]; parallelFlipRotation: number; range?: [any, any]; regularFlipRotation: number; scale?: Scale<any, number, number | TimeInterval>; sideFlag: 1 | -1; stroke?: string; strokeOpacity?: number; strokeWidth?: number; type: CrossLineType; update(visible: boolean): void; value?: any; set(properties: object): void; }