import { type ReactNode } from 'react'; import type { ConvertibleUnit, FormatOptions, Unit } from '@dynatrace-sdk/units'; import type { ThresholdMetadata } from './meter-bar-chart-internal.js'; import type { MeterBarChartThresholdProps } from './meter-bar-chart.js'; import type { Formatter } from '../../../core/types/formatter.js'; import type { MeterBarSize, SlotWithAutoDefault } from '../../shared/types/meter-bars.js'; /** * @internal */ export interface MeterBarChartSlots { label?: ReactNode; min?: SlotWithAutoDefault; max?: SlotWithAutoDefault; value?: SlotWithAutoDefault; icon?: ReactNode; thresholds?: ThresholdMetadata; tooltip?: boolean; } /** * Configuration props to be provided by the consumer * @public */ export interface MeterBarChartConsumerConfig { /** * The chart thresholds to include inside meter bar charts that are within the configuration */ thresholds?: MeterBarChartThresholdConsumerConfig; /** * The size to apply to meter bar charts that are within the configuration * @defaultvalue 'size16' */ size?: MeterBarSize; /** * Min value for the meter bar chart scale * @defaultValue 0 */ min?: number; /** * Max value for the meter bar chart scale * @defaultValue 100 */ max?: number; /** * Custom Formatter for the chart */ formatter?: Formatter | FormatOptions; /** * Set to true to display the tooltip or false to hide it. * @defaultValue false */ tooltip?: boolean; } /** * Threshold configuration props to be provided by the consumer * @public */ export interface MeterBarChartThresholdConsumerConfig { /** * The data input for a list of thresholds * @defaultValue [] */ data?: MeterBarChartThresholdProps[]; /** * Set to true to display the threshold legend and false to hide it. * @defaultValue false */ legend?: boolean; }