import { XYComponentConfigInterface } from '../../core/xy-component/config'; import { WithOptional } from '../../types/misc'; import { ColorAccessor, NumericAccessor, StringAccessor, GenericAccessor } from '../../types/accessor'; import { FillPatternType } from '../../styles/patterns'; import { TextAlign, TrimMode } from '../../types/text'; import { Arrangement } from '../../types/position'; import { TimelineArrow, TimelineLineRenderState, TimelineRowIcon, TimelineRowLabel } from './types'; export interface TimelineConfigInterface extends WithOptional, 'y'> { /** @deprecated This property has been renamed to `lineRow` */ type?: StringAccessor; /** @deprecated This property has been renamed to `lineDuration` */ length?: NumericAccessor; /** @deprecated This property has been renamed to `lineCursor` */ cursor?: StringAccessor; /** Timeline item row accessor function. Records with the `lineRow` will be plotted in one row. Default: `undefined` */ lineRow?: StringAccessor; /** Timeline item duration accessor function. Default: `undefined`. Falls back to the deprecated `length` property */ lineDuration?: NumericAccessor; /** Timeline item color accessor function. Default: `d => d.color` */ color?: ColorAccessor; /** Timeline item fill pattern accessor. Resolves to a `FillPatternType`. Default: `undefined` */ pattern?: GenericAccessor; /** Width of the timeline items. Default: `8` */ lineWidth?: NumericAccessor; /** Display rounded ends for timeline items. Default: `true` */ lineCap?: boolean; /** Provide a href to an SVG defined in container's `svgDefs` to display an icon at the start of the line. Default: undefined */ lineStartIcon?: StringAccessor; /** Line start icon color accessor function. Default: `undefined` */ lineStartIconColor?: StringAccessor; /** Line start icon size accessor function. Default: `undefined` */ lineStartIconSize?: NumericAccessor; /** Line start icon arrangement configuration. Controls how the icon is positioned relative to the line. * Accepts values from the Arrangement enum: `Arrangement.Start`, `Arrangement.Middle`, `Arrangement.End` or a string equivalent. * Default: `Arrangement.Inside` */ lineStartIconArrangement?: GenericAccessor; /** Provide a href to an SVG defined in container's `svgDefs` to display an icon at the end of the line. Default: undefined */ lineEndIcon?: StringAccessor; /** Line end icon color accessor function. Default: `undefined` */ lineEndIconColor?: StringAccessor; /** Line end icon size accessor function. Default: `undefined` */ lineEndIconSize?: NumericAccessor; /** Line end icon arrangement configuration. Controls how the icon is positioned relative to the line. * Accepts values from the Arrangement enum: `Arrangement.Start`, `Arrangement.Middle`, `Arrangement.End` or a string equivalent. * Default: `Arrangement.Inside` */ lineEndIconArrangement?: GenericAccessor; /** Configurable Timeline item cursor when hovering over. Default: `undefined` */ lineCursor?: StringAccessor; /** Sets the minimum line length to 1 pixel for better visibility of small values. * When `lineCap` is set to `true`, the segment will be rendered as a circle. * Default: `false` */ showEmptySegments?: boolean; /** Center small segments when `showEmptySegments` and `lineCap` are set to `true`. * Default: `true` */ showEmptySegmentsCorrectPosition?: boolean; /** Timeline row height. Default: `22` */ rowHeight?: number; /** Alternating row colors. Default: `true` */ alternatingRowColors?: boolean; /** @deprecated This property has been renamed to `showRowLabels */ showLabels?: boolean; /** @deprecated This property has been renamed to `rowLabelWidth */ labelWidth?: number; /** @deprecated This property has been renamed to `rowMaxLabelWidth */ maxLabelWidth?: number; /** Show row labels when set to `true`. Default: `false`. Falls back to deprecated `showLabels` */ showRowLabels?: boolean; /** Row label style as an object with the `{ [property-name]: value }` format. Default: `undefined` */ rowLabelStyle?: GenericAccessor, TimelineRowLabel>; /** Row label formatter function. Default: `undefined` */ rowLabelFormatter?: (key: string, items: Datum[], i: number) => string; /** Provide an icon href to be displayed before the row label. Default: `undefined` */ rowIcon?: (key: string, items: Datum[], i: number) => TimelineRowIcon | undefined; /** Fixed label width in pixels. Labels longer than the specified value will be trimmed. Default: `undefined`. Falls back to deprecated `labelWidth`. */ rowLabelWidth?: number; /** Maximum label width in pixels. Labels longer than the specified value will be trimmed. Default: `undefined`. Falls back to deprecated `maxLabelWidth`. */ rowMaxLabelWidth?: number; /** Text alignment for labels: `TextAlign.Left`, `TextAlign.Center` or `TextAlign.Right`. Default: `TextAlign.Right` */ rowLabelTextAlign?: TextAlign | `${TextAlign}`; /** Row label trim mode when width is limited: `TrimMode.Start`, `TrimMode.Middle` or `TrimMode.End`. Default: `TrimMode.Middle` */ rowLabelTrimMode?: TrimMode | `${TrimMode}`; /** Row label margin in pixels. Can be a single number or a `[left, right]` tuple. Default: `[0, 5]` */ rowLabelMargin?: number | [number, number]; /** When component height is larger than the height of all rows, render rows to fill empty space */ rowFillEmptySpace?: boolean; arrows?: TimelineArrow[]; /** Control the animation by specify the initial position for new lines as [x, y]. Default: `undefined` */ animationLineEnterPosition?: [ number | undefined | null, number | undefined | null ] | ((d: Datum & TimelineLineRenderState, i: number, data: (Datum & TimelineLineRenderState)[]) => [number | undefined, number | undefined]) | undefined; /** Control the animation by specify the destination position for exiting lines as [x, y]. Default: `undefined` */ animationLineExitPosition?: [number | undefined | null, number | undefined | null] | ((d: Datum & TimelineLineRenderState, i: number, data: (Datum & TimelineLineRenderState)[]) => [number | undefined, number | undefined]) | undefined; /** Scrolling callback function: `(scrollTop: number) => void`. Default: `undefined` */ onScroll?: (scrollTop: number) => void; } export declare const TimelineDefaultConfig: TimelineConfigInterface;