import type { Unit } from '@dynatrace-sdk/units'; import type { TimeseriesBand } from './timeseries-band.js'; import type { PointsDisplay } from '../../core/components/canvas/types/canvas-shape.js'; import type { ColorToken } from '../../core/types/color-palette.js'; import type { TimeGapPolicy } from '../../core/types/gap-policy.js'; import type { ValueRepresentation } from '../../core/types/scales.js'; import type { Timeseries } from '../../core/types/timeseries.js'; /** * options for choosing the chart variant * @public */ export declare const chartVariantOptions: readonly ["line", "area", "bar"]; /** * Type of the chart that will be displayed in a timeseries * @public */ export type ChartVariant = (typeof chartVariantOptions)[number]; /** * @public */ export type TimeseriesZoomDomain = Date[] | number[]; /** * @internal */ export type AxesUnits = [string | Unit, string | Unit]; /** * @internal */ export interface SeriesMetadata { id: string; color: ColorToken; gapPolicy: TimeGapPolicy; pointsDisplay: PointsDisplay; unit?: string | Unit; originalUnit?: string | Unit; } interface DatapointsMapBase { seriesId: string; color: ColorToken; isGap: boolean; variant: ChartVariantInternal; start: Date; end?: Date; center?: Date; value?: number; unit?: string | Unit; absoluteValue?: number; cumulativeValue?: number; y0?: number; absoluteY0?: number; y1?: number; absoluteY1?: number; seriesName: string | string[]; originalUnit?: string | Unit; } interface DatapointsMapWithoutBand extends DatapointsMapBase { variant: ChartVariant; } export interface DatapointsMapBand extends DatapointsMapBase { variant: 'band'; y0: number; y1: number; } /** * @internal */ export type DatapointsMap = DatapointsMapWithoutBand | DatapointsMapBand; /** * @internal */ export type WeakMapSeries = WeakMap; /** * @internal */ export type WeakMapDatapoints = WeakMap; /** * @internal */ export type ValueRepresentationPerVariant = Map; /** * Displays assigned properties from a series slot * @internal */ export interface TimeseriesBandSlotProps extends TimeseriesBand, TimeseriesVisualSlotProps { strokeOnly: boolean; } /** * @internal */ export type TimeseriesSlotProps = TimeseriesVariantSlotProps | TimeseriesBandSlotProps; /** * @internal */ export type TimeseriesVariantSlotProps = TimeseriesLineSlotProps | TimeseriesAreaSlotProps | TimeseriesBarSlotProps; /** * @internal */ export type TimeseriesPerVariant = Record & { shapePriority: ChartVariantInternal[]; band: TimeseriesBandSlotProps[]; }; /** * @public */ export interface TimeseriesChartVisualProps { /** Custom color to represent this series. Overrides the colorPalette config. Eg: '#e1e1e1'**/ color?: string; /** Value representation of the series */ valueRepresentation?: ValueRepresentation; } /** * @internal */ export interface TimeseriesVisualSlotProps { /** Custom color to represent this series. Overrides the colorPalette config. Eg: '#e1e1e1'**/ color?: string; /** Value representation of the serie */ valueRepresentation?: ValueRepresentation; /** Gap policy config of the series */ gapPolicy?: TimeGapPolicy; /** Points to display config of the series */ pointsDisplay?: PointsDisplay; } /** * @internal */ export interface TimeseriesLineSlotProps extends Timeseries, TimeseriesVisualSlotProps { } /** * @internal */ export interface TimeseriesAreaSlotProps extends Timeseries, TimeseriesVisualSlotProps { } /** * @internal */ export type ChartVariantInternal = ChartVariant | 'band'; /** * @internal */ export type TimeseriesBarSlotProps = Timeseries & TimeseriesVisualSlotProps; /** * @internal */ export interface ScaleMetadata { min?: number; max?: number; unit?: string | Unit; } export {};