import { type ReactNode } from 'react'; import type { ConvertibleUnit, FormatOptions, Unit } from '@dynatrace-sdk/units'; import type { MultiMeterBarChartInternalTooltipConfig } from './multi-meter-bar-chart-internal.js'; import type { MultiMeterBarChartTooltipVariant, MultiMeterBarSegmentProps } from './multi-meter-bar-chart.js'; import type { ColorPalette, CustomColorPalette } from '../../../core/types/color-palette.js'; import type { ColorRuleProps } from '../../../core/types/color-rule.js'; import type { Formatter } from '../../../core/types/formatter.js'; import { MeterBarToolbarConfig } from '../../shared/types/meter-bar-toolbar.js'; import type { MeterBarSize, SlotWithAutoDefault } from '../../shared/types/meter-bars.js'; /** * @internal */ export interface MultiMeterBarChartSlots { label?: ReactNode; min?: SlotWithAutoDefault; max?: SlotWithAutoDefault; value?: SlotWithAutoDefault; segments: MultiMeterBarSegmentProps[]; legend?: boolean; tooltip?: MultiMeterBarChartInternalTooltipConfig; colorRules: ColorRuleProps[]; toolbar?: MeterBarToolbarConfig; } /** * Configuration props to be provided by the consumer * @public */ export interface MultiMeterBarChartConsumerConfig { /** * The color palette * @defaultValue 'categorical' */ colorPalette?: ColorPalette | CustomColorPalette; /** * The size to apply to meter bar charts that are within the configuration * @defaultvalue 'size16' */ size?: MeterBarSize; /** * The custom unit for the value of the multi meter bar. */ unit?: string | Unit; /** * Min value for the meter bar chart scale * @defaultValue 0 */ min?: number; /** * Max value for the meter bar chart scale * @defaultValue 100 */ max?: number; /** Show the loading indicator when truthy. * @defaultValue false */ loading?: boolean; /** * Custom Formatter for the chart */ formatter?: Formatter | FormatOptions; /** * Tooltip configuration */ tooltip?: MultiMeterBarChartTooltipConsumerConfig; /** * Set to true to display the legend and false to hide it. * @defaultValue false */ legend?: boolean; /** Color rules to apply to the meter bar chart */ colorRules?: ColorRuleProps[]; /** Configuration for the toolbar */ toolbar?: MeterBarToolbarConfig; } /** * Tooltip configuration to be provided by the consumer * @public */ export interface MultiMeterBarChartTooltipConsumerConfig { /** * Defines how the tooltip should display the chart information * @defaultValue 'single' */ variant?: MultiMeterBarChartTooltipVariant; /** * Set to true to hide the tooltip. * @defaultValue false */ hidden?: boolean; /** * @deprecated Use `hidden` instead (note the inverted polarity: * `enabled: false` ⇒ `hidden: true`). (APPDEV-17990) */ enabled?: boolean; }