import { type StylingProps, type MaskingProps, type DataTestId } from '@dynatrace/strato-components/core'; import type { ConvertibleUnit, FormatOptions, Unit } from '@dynatrace-sdk/units'; import type { MultiMeterBarChartTooltipVariant } from './multi-meter-bar-chart-config.js'; import type { CustomColorPalette, ColorPalette } from '../../../core/types/color-palette.js'; import type { Formatter } from '../../../core/types/formatter.js'; import type { MeterBarSize } from '../../shared/types/meter-bars.js'; /** * Information hold by each segment in the multi meter bar chart * @public */ export type MultiMeterBarSegmentData = { id: string; name: string; values: string[]; }; /** * @public */ export interface MultiMeterBarChartProps extends StylingProps, MaskingProps, DataTestId { /** * Min value for the multi meter bar chart scale. * @defaultValue 0 */ min?: number; /** * Max value for the multi meter bar chart scale. * @defaultValue 'auto' */ max?: number | 'auto'; /** * Color palette to be used for the segments * @defaultValue "categorical" */ colorPalette?: ColorPalette | CustomColorPalette; /** * The size that applies to the value, icon, and label. * @defaultvalue 'size16' */ size?: MeterBarSize; /** * Custom Formatter for the chart */ formatter?: Formatter | FormatOptions; /** Exposed callback to display series actions */ seriesActions?: (seriesData: MultiMeterBarSegmentData) => React.ReactNode; } /** * @public */ export interface MultiMeterBarSegmentProps { /** * Segment percentage value */ value: number; /** * Segment name */ name: string; /** * Segment color, if not provided, color that comes from the parent colorPalette value will be used */ color?: string; } /** * @public */ export interface MultiMeterBarChartTooltipProps { /** * Variant to be used for the multi meter bar chart tooltip * @defaultValue "single" */ variant?: MultiMeterBarChartTooltipVariant; }