import { type ReactElement } from 'react'; import type { Unit } from '@dynatrace-sdk/units'; import type { TimeGapPolicy } from '../../core/types/gap-policy.js'; import type { TimeseriesUnit } from '../../core/types/timeseries.js'; /** * Props for the TimeSeriesChart.TimeSeriesBand slot component * @public */ export interface TimeseriesChartBandProps { /** The series data passed to the band */ data: TimeseriesBand; /** Whether only the band chart edges strokes are visible. Default value: false */ strokeOnly?: boolean; /** The unique color picked for this time series representation in HEX, RGB, Color Token or HSL.*/ color?: string; /** Exposed callback to display series action for a series */ seriesAction?: (series: TimeseriesBandDataPoint) => ReactElement; gapPolicy?: TimeGapPolicy; } /** * @public */ export interface TimeseriesBandDataPoint { /** MinFirst value for a band datapoint. */ y0: number; /** MaxSecond value for a band datapoint */ y1: number; /** Starting timestamp for the datapoint representation */ start: Date; /** Ending timestamp for the datapoint representation */ end?: Date; } /** * @public */ export interface TimeseriesBand extends Record { /** The data points recordset for this time series for the band */ datapoints: TimeseriesBandDataPoint[]; /** The name or names in case of multiple dimensions for the time series */ name: string | string[]; /** Unit token for the value represented by the time series datap oints. Eg: 'kbit/s' */ unit?: TimeseriesUnit | string | Unit; }