import type { AgChartLabelStyleOptions } from './labelOptions'; import type { AgCssColorOrRef } from './themeParamsOptions'; import type { AxisValue, CssColor, FontFamilyFull, Opacity, PixelSize } from './types'; export interface AgCommonCrossLineOptions { /** Whether to show the Cross Line. */ enabled?: boolean; /** The colour of the stroke for the lines. A colour string, or a theme-colour reference object. */ stroke?: AgCssColorOrRef; /** The width in pixels of the stroke for the lines. */ strokeWidth?: PixelSize; /** The opacity of the stroke for the lines. */ strokeOpacity?: Opacity; /** Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels. */ lineDash?: PixelSize[]; /** Configuration for the Cross Line label. */ label?: LabelType; } export interface AgLineCrossLineOptions extends AgCommonCrossLineOptions { /** Renders the Cross Line as a single line positioned at `value`. */ type: 'line'; /** The data value at which the line should be positioned. */ value: TValue; } export interface AgRangeCrossLineOptions extends AgCommonCrossLineOptions { /** Renders the Cross Line as a shaded band spanning `range`. */ type: 'range'; /** The `[start, end]` data values bounding the shaded region. */ range: [TValue, TValue]; /** The colour to use for the fill of the range. */ fill?: CssColor; /** The opacity of the fill for the range. */ fillOpacity?: Opacity; } export type AgBaseCrossLineOptions = AgLineCrossLineOptions | AgRangeCrossLineOptions; export interface AgCrossLineThemeOptions extends AgCommonCrossLineOptions { /** The colour to use for the fill of the range. */ fill?: CssColor; /** The opacity of the fill for the range. */ fillOpacity?: Opacity; } export interface AgBaseCrossLineLabelOptions extends Omit { /** The text to show in the label. */ text?: string; /** The font family to use for the label. A single family name, or an array of names used as fallbacks. */ fontFamily?: FontFamilyFull; } export type AgCrossLineLabelPosition = 'top' | 'left' | 'right' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'inside' | 'inside-left' | 'inside-right' | 'inside-top' | 'inside-bottom' | 'inside-top-left' | 'inside-bottom-left' | 'inside-top-right' | 'inside-bottom-right';