import type { LineDashOptions, StrokeOptions } from '../series/cartesian/commonOptions'; import type { ContextCallbackParams, DatumCallbackParams, HighlightState, Styler } from './callbackOptions'; import type { ContextDefault, DatumDefault, DatumKey, PixelSize, Ratio } from './types'; export type AgErrorBarItemStylerParams = DatumCallbackParams & ContextCallbackParams & SeriesKeyOptions & ErrorBarKeyOptions & Required; interface ErrorBarStylingOptions extends StrokeOptions, LineDashOptions { /** Whether to display the error bars. */ visible?: boolean; } interface SeriesKeyOptions { /** The key to use to retrieve x-values from the data. */ xKey: DatumKey; /** The key to use to retrieve y-values from the data. */ yKey?: DatumKey; } interface ErrorBarKeyOptions { /** The key to use to retrieve lower bound error values from the x-axis data. */ xLowerKey?: DatumKey; /** The key to use to retrieve upper bound error values from the x-axis data. */ xUpperKey?: DatumKey; /** The key to use to retrieve lower bound error values from the y-axis data. */ yLowerKey?: DatumKey; /** The key to use to retrieve upper bound error values from the y-axis data. */ yUpperKey?: DatumKey; } interface ErrorBarNameOptions { /** Human-readable description of the lower bound error value for the x-axis. This is the value to use in tooltips or labels. */ xLowerName?: string; /** Human-readable description of the upper bound error value for the x-axis. This is the value to use in tooltips or labels. */ xUpperName?: string; /** Human-readable description of the lower bound error value for the y-axis. This is the value to use in tooltips or labels. */ yLowerName?: string; /** Human-readable description of the upper bound error value for the y-axis. This is the value to use in tooltips or labels. */ yUpperName?: string; } interface ErrorBarFormatterOption { /** Function used to return formatting for individual error bars, based on the given parameters.*/ itemStyler?: Styler, AgErrorBarThemeableOptions>; } export interface ErrorBarCapOptions extends ErrorBarStylingOptions { /** Absolute length of caps in pixels. */ length?: PixelSize; /** Length of caps relative to the shape used by the series. */ lengthRatio?: Ratio; } export interface AgErrorBarThemeableOptions extends ErrorBarStylingOptions { /** Options to style error bars' caps */ cap?: ErrorBarCapOptions; } export interface AgErrorBarOptions extends ErrorBarKeyOptions, ErrorBarNameOptions, ErrorBarFormatterOption, AgErrorBarThemeableOptions { } export {};