import type { ContextCallbackParams, DatumCallbackParams, HighlightState, SelectionState, SeriesCallbackParams, Styler } from '../../chart/callbackOptions'; import type { AgDropShadowOptions } from '../../chart/dropShadowOptions'; import type { AgChartLabelOptions } from '../../chart/labelOptions'; import type { AgSeriesTooltip, AgSeriesTooltipRendererParams } from '../../chart/tooltipOptions'; import type { ContextDefault, DatumDefault, DatumKey, Opacity, PixelSize, Ratio } from '../../chart/types'; import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions, AgMultiSeriesHighlightOptions, AgSeriesSegmentation, AgSeriesShapeSegmentOptions } from '../seriesOptions'; import type { AgBaseCartesianSeriesAxisOptions, FillOptions, LineDashOptions, StrokeOptions } from './commonOptions'; export type AgRangeBarSeriesItemStylerParams = DatumCallbackParams & ContextCallbackParams & AgRangeBarSeriesOptionsKeys & Required; export interface AgRangeBarSeriesStylerParams extends SeriesCallbackParams, ContextCallbackParams, AgRangeBarSeriesOptionsKeys, Required { } export interface AgRangeBarSeriesStyle extends FillOptions, StrokeOptions, LineDashOptions { /** Apply rounded corners to each bar. */ cornerRadius?: PixelSize; } export type AgRangeBarSeriesTooltipRendererParams = AgSeriesTooltipRendererParams & AgRangeBarSeriesOptionsKeys & AgRangeBarSeriesOptionsNames & AgRangeBarSeriesStyle; export interface AgRangeBarSeriesLabelOptions extends AgChartLabelOptions, TContext> { /** Where to render series labels relative to the bars. */ placement?: AgRangeBarSeriesLabelPlacement; /** Spacing in pixels between the label and the edge of the bar. */ spacing?: PixelSize; } export type AgRangeBarSeriesLabelPlacement = 'inside' | 'outside'; export interface AgRangeBarSeriesThemeableOptions extends AgBaseCartesianThemeableOptions, AgRangeBarSeriesStyle { /** * Bar rendering direction. * * __Note:__ This option affects the layout direction of X and Y data values. */ direction?: 'horizontal' | 'vertical'; /** Series-specific tooltip configuration. */ tooltip?: AgSeriesTooltip>; /** Configuration for the labels shown on top of data points. */ label?: AgRangeBarSeriesLabelOptions; /** Configuration for the shadow used behind the series items. */ shadow?: AgDropShadowOptions; /** Function used to return formatting for entire series, based on the given parameters.*/ styler?: Styler, AgRangeBarSeriesStyle>; /** Function used to return formatting for individual RangeBar series item cells, based on the given parameters.*/ itemStyler?: Styler, AgRangeBarSeriesStyle>; /** Configuration for highlighting when a series or legend item is hovered over. */ highlight?: AgMultiSeriesHighlightOptions; /** Whether to group together (adjacently) separate bars. */ grouped?: boolean; /** Configuration for styling series as separate segments. */ segmentation?: AgSeriesSegmentation; /** Fixed width of each bar in the series. */ width?: PixelSize; /** Ratio of the bandwidth (or specified width) to use for the width for each bar in the series. */ widthRatio?: Ratio; } export interface AgRangeBarHighlightStyleOptions extends AgRangeBarSeriesStyle { /** The opacity of the whole series (line, fill, labels and markers, if any) */ opacity?: Opacity; } export type AgRangeBarSeriesLabelFormatterParams = AgRangeBarSeriesOptionsKeys & AgRangeBarSeriesOptionsNames; export interface AgRangeBarSeriesOptionsKeys { /** The key to use to retrieve x-values from the data. */ xKey: DatumKey; /** The key to use to retrieve y-low-values from the data. */ yLowKey: DatumKey; /** The key to use to retrieve y-high-values from the data. */ yHighKey: DatumKey; } export interface AgRangeBarSeriesOptionsNames { /** A human-readable description of the x-values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters. */ xName?: string; /** A human-readable description of the y-values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters. */ yName?: string; /** A human-readable description of the y-low-values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters. */ yLowName?: string; /** A human-readable description of the y-high-values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters. */ yHighName?: string; /** Human-readable description of the y-values. If supplied, matching items with the same value will be toggled together. */ legendItemName?: string; } export interface AgRangeBarSeriesOptions extends AgRangeBarSeriesOptionsKeys, AgRangeBarSeriesOptionsNames, AgRangeBarSeriesThemeableOptions, Omit, 'highlight'>, AgBaseCartesianSeriesAxisOptions { /** Configuration for the Range Bar Series. */ type: 'range-bar'; }