import type { AgCartesianSeriesOptions } from '../series/cartesian/cartesianSeriesTypes'; import type { FillOptions, StrokeOptions } from '../series/cartesian/commonOptions'; import type { AgAnnotationsOptions } from './annotationsOptions'; import type { AgAxisBaseIntervalOptions, AgAxisBaseTickOptions, AgAxisContinuousIntervalOptions, AgAxisLabelStylerParams, AgBaseAxisLabelOptions, AgBaseAxisLabelStyleOptions, AgBaseAxisOptions, AgBaseContinuousAxisOptions, AgCartesianAxisCaptionOptions, AgContinuousAxisOptions, AgNumericAxisFormattableLabelOptions, AgTimeAxisFormattableLabelFormat, AgTimeAxisFormattableLabelOptions, AgTimeInterval, AgTimeIntervalUnit } from './axisOptions'; import type { AgBandHighlightOptions } from './bandHighlightOptions'; import type { Styler } from './callbackOptions'; import type { AgBaseThemeableChartOptions, AgSeriesAreaOptions } from './chartOptions'; import type { AgChartLabelCollisionOptions } from './collisionAvoidanceOptions'; import type { AgBaseCrossLineLabelOptions, AgCrossLineLabelPosition, AgCrossLineThemeOptions, AgLineCrossLineOptions, AgRangeCrossLineOptions } from './crossLineOptions'; import type { AgBaseCrosshairLabel, AgCrosshairLabel, AgCrosshairOptions } from './crosshairOptions'; import type { AgNumericValue, AgTimeValue } from './dataValues'; import type { AgAxesChartListeners, AgAxisListeners } from './eventOptions'; import type { AgChartLabelAutoFontSizeOptions, AgChartLabelFitOptions, AgChartLabelStyleOptions } from './labelOptions'; import type { AxisValue, ContextDefault, DatumDefault, Degree, FontFamilyFull, FontSize, PixelSize, Ratio, TextWrap } from './types'; /** Configuration for axes in cartesian charts. */ export interface AgBaseCartesianAxisOptions, CrosshairLabelType = AgCrosshairLabel, TContext = ContextDefault> extends AgBaseAxisOptions { /** The position on the chart where the axis should be rendered. */ position?: AgCartesianAxisPosition; /** Value on the first perpendicular axis' domain where this axis should intersect. */ crossAt?: AgCartesianAxisCrossAt; /** Add cross-lines or regions corresponding to data values. */ crossLines?: AgCartesianCrossLineOptions[]; /** Sets the axis thickness regardless of its content. */ thickness?: PixelSize; /** * The maximum thickness of the axis, as a ratio of the chart's width or height depending on axis direction. * Used to prevent the axis from growing too large when labels or content are oversized. * * Default: `0.3` */ maxThicknessRatio?: Ratio; /** Configuration for the title shown next to the axis. */ title?: AgCartesianAxisCaptionOptions; /** Configuration for the axis crosshair. */ crosshair?: AgCrosshairOptions; /** A map of event names to event listeners. */ listeners?: AgAxisListeners; } export interface AgCartesianAxisCrossAt { /** The value on the perpendicular axis' domain where this axis should intersect. */ value: AgNumericValue | Date | string | string[]; /** * Whether the axis should remain visible when the cross position is outside the perpendicular axis domain. * * Default: `true` */ sticky?: boolean; /** * Whether the axis title is placed at the crossing point, or at the axis' `position` edge. * * Default: `'crossing'` */ titlePlacement?: AgCartesianAxisCrossAtPlacement; /** * Whether the axis labels are placed at the crossing point, or at the axis' `position` edge. * * Default: `'crossing'` */ labelPlacement?: AgCartesianAxisCrossAtPlacement; /** * Whether the crosshair label is placed at the crossing point, or at the axis' `position` edge. * * Default: `'edge'` */ crosshairLabelPlacement?: AgCartesianAxisCrossAtPlacement; } /** Where a component of a crossing axis is drawn: at the crossing point, or at the axis' `position` edge. */ export type AgCartesianAxisCrossAtPlacement = 'crossing' | 'edge'; export interface AgTimeAxisParentLevel { /** Enables parent level labels and ticks. */ enabled?: boolean; /** Configuration for the axis labels, shown next to the ticks. */ label?: AgTimeAxisParentLevelLabelOptions; /** Configuration for the axis ticks. */ tick?: AgAxisBaseTickOptions; } export interface AgTimeAxisParentLevelLabelOptions extends Omit, 'maxWidth' | 'maxHeight' | 'minimumFontSize'> { } export interface AgCartesianAxisLabelOptions extends AgBaseCartesianAxisLabelOptions, AgNumericAxisFormattableLabelOptions { } export interface AgCartesianTimeAxisLabelOptions extends AgBaseCartesianAxisLabelOptions, AgTimeAxisFormattableLabelOptions { } export interface AgBaseCartesianAxisLabelOptions extends AgBaseAxisLabelOptions { /** If specified and axis labels may collide, they are rotated so that they are positioned at the supplied angle. This is enabled by default for category. If the `rotation` property is specified, it takes precedence. */ autoRotate?: boolean; /** If autoRotate is enabled, specifies the rotation angle to use when autoRotate is activated. Defaults to an angle of 335 degrees if unspecified. */ autoRotateAngle?: Degree; /** * Text wrapping strategy for long text. * - `'always'` will always wrap text to fit within the `maxWidth`. * - `'hyphenate'` is similar to `'always'`, but inserts a hyphen (`-`) if forced to wrap in the middle of a word. * - `'on-space'` will only wrap on white space: spaces, tabs and zero-width spaces (`\u200B`), but not on a non-breaking space (`\u00A0`). * - `'never'` disables text wrapping. * * Default: `'on-space'` for category axes, `'never'` for all other axes */ wrapping?: TextWrap; /** * If truncate is enabled, the text will be truncated to fit available space and an ellipsis (`...`) will be added at the end of the text. */ truncate?: boolean; /** * Maximum size of each label along the text direction, in pixels. * * Labels are also kept within the space the axis has available, clear of any scrollbar. * Text that still does not fit after wrapping, and shrinking towards `minimumFontSize` when set, is truncated with an ellipsis, or hidden when `truncate` is `false`. */ maxWidth?: PixelSize; /** * Maximum size of each label across the text direction, in pixels. * * Labels are also kept within the space the axis has available, clear of any scrollbar. * Text that still does not fit after wrapping, and shrinking towards `minimumFontSize` when set, is truncated with an ellipsis, or hidden when `truncate` is `false`. */ maxHeight?: PixelSize; /** * If a label does not fit within `maxWidth`, `maxHeight` or the space the axis has available, setting this * allows the label to pick a font size between its normal `fontSize` and `minimumFontSize` to fit. * The label is only truncated or hidden when it still does not fit at `minimumFontSize`. */ minimumFontSize?: FontSize; } export interface AgGroupedCategoryAxisLabelOptions extends Omit, 'itemStyler'> { /** * Text wrapping strategy for long text. * - `'always'` will always wrap text to fit within the `maxWidth`. * - `'hyphenate'` is similar to `'always'`, but inserts a hyphen (`-`) if forced to wrap in the middle of a word. * - `'on-space'` will only wrap on white space: spaces, tabs and zero-width spaces (`\u200B`), but not on a non-breaking space (`\u00A0`). * - `'never'` disables text wrapping. * * Default: `'on-space'` */ wrapping?: TextWrap; /** * If truncate is enabled, the text will be truncated to fit available space and an ellipsis (`...`) will be added at the end of the text. */ truncate?: boolean; /** * Maximum size of each label along the text direction, in pixels. * * Labels are also kept within the space the axis has available, clear of any scrollbar. * Text that still does not fit after wrapping, and shrinking towards `minimumFontSize` when set, is truncated with an ellipsis, or hidden when `truncate` is `false`. */ maxWidth?: PixelSize; /** * Maximum size of each label across the text direction, in pixels. * * Labels are also kept within the space the axis has available, clear of any scrollbar. * Text that still does not fit after wrapping, and shrinking towards `minimumFontSize` when set, is truncated with an ellipsis, or hidden when `truncate` is `false`. */ maxHeight?: PixelSize; /** * If a label does not fit within `maxWidth`, `maxHeight` or the space the axis has available, setting this * allows the label to pick a font size between its normal `fontSize` and `minimumFontSize` to fit. * The label is only truncated or hidden when it still does not fit at `minimumFontSize`. */ minimumFontSize?: FontSize; /** Function used to style axis labels. */ itemStyler?: Styler, AgBaseAxisLabelStyleOptions>; } export interface AgGroupedCategoryAxisLabelStylerParams extends AgAxisLabelStylerParams { /** The depth of the label, used by `grouped-category` axes. */ readonly depth: number; } export type AgCartesianAxesOptions = Record> & { x?: AgCartesianAxisOptions; y?: AgCartesianAxisOptions; }; export interface AgBaseCartesianChartOptions { /** Axis configurations. * * Axes are referenced using a dictionary of axis definitions, where each axis is identified by a key. * The default keys are `x` and `y` for cartesian axes, or `radius` and `angle` for polar axes. * * See: [Axis Configuration](/r/axes-configuration/) */ axes?: AgCartesianAxesOptions; /** Series configurations. */ series?: AgCartesianSeriesOptions[]; /** Annotations configurations. */ annotations?: AgAnnotationsOptions; } export interface AgGroupedCategoryDepthLabelOptions extends Pick, 'enabled' | 'avoidCollisions' | 'rotation' | 'spacing' | 'border' | 'color' | 'cornerRadius' | 'fill' | 'fontFamily' | 'fontSize' | 'lineHeight' | 'fontStyle' | 'fontWeight' | 'padding'> { /** * Text wrapping strategy for long text. * - `'always'` will always wrap text to fit within the `maxWidth`. * - `'hyphenate'` is similar to `'always'`, but inserts a hyphen (`-`) if forced to wrap in the middle of a word. * - `'on-space'` will only wrap on white space: spaces, tabs and zero-width spaces (`\u200B`), but not on a non-breaking space (`\u00A0`). * - `'never'` disables text wrapping. * * Default: `'on-space'` */ wrapping?: TextWrap; /** * If truncate is enabled, the text will be truncated to fit available space and an ellipsis (`...`) will be added at the end of the text. */ truncate?: boolean; /** * Maximum size of each label along the text direction, in pixels. * * Labels are also kept within the space the axis has available, clear of any scrollbar. * Text that still does not fit after wrapping, and shrinking towards `minimumFontSize` when set, is truncated with an ellipsis, or hidden when `truncate` is `false`. */ maxWidth?: PixelSize; /** * Maximum size of each label across the text direction, in pixels. * * Labels are also kept within the space the axis has available, clear of any scrollbar. * Text that still does not fit after wrapping, and shrinking towards `minimumFontSize` when set, is truncated with an ellipsis, or hidden when `truncate` is `false`. */ maxHeight?: PixelSize; /** * If a label does not fit within `maxWidth`, `maxHeight` or the space the axis has available, setting this * allows the label to pick a font size between its normal `fontSize` and `minimumFontSize` to fit. * The label is only truncated or hidden when it still does not fit at `minimumFontSize`. */ minimumFontSize?: FontSize; } export type AgGroupedCategoryDepthTickOptions = Pick; export interface AgGroupedCategoryDepthOptions { /** Configuration for the axis labels at this depth level. */ label?: AgGroupedCategoryDepthLabelOptions; /** Configuration for the axis ticks at this depth level. */ tick?: AgGroupedCategoryDepthTickOptions; } type AgAxisIntervalPlacement = 'on' | 'between'; export interface AgAxisCategoryIntervalOptions extends AgAxisBaseIntervalOptions { /** * Placement of ticks and labels relative to the category. * * Default: `'between'` */ placement?: AgAxisIntervalPlacement; } export interface AgAxisDiscreteTimeIntervalOptions extends AgAxisContinuousIntervalOptions { /** * Placement of ticks and labels relative to the time interval. * * Default: `'between'` */ placement?: AgAxisIntervalPlacement; } export type AgBandAlignment = 'justify' | 'start' | 'center' | 'end'; export interface AgCategoryAxisOptions extends AgBaseCartesianAxisOptions, AgBaseCrosshairLabel, TContext> { type?: 'category'; /** Configuration for the axis ticks interval. */ interval?: AgAxisCategoryIntervalOptions; /** The size of the gap between the categories as a proportion, between 0 and 1. This value is a fraction of the “step”, which is the interval between the start of a band and the start of the next band. */ paddingInner?: Ratio; /** The padding on the outside i.e. left and right of the first and last category. In association with `paddingInner`, this value can be between 0 and 1. */ paddingOuter?: Ratio; /** This property is for grouped column/bar series plotted on a category axis. It is a proportion between 0 and 1 which determines the size of the gap between the bars or columns within a single group along the axis. */ groupPaddingInner?: Ratio; /** Configuration for the axis band highlight. */ bandHighlight?: AgBandHighlightOptions; /** * The alignment of bands when used with bar-like series with fixed widths. * * Default: `'justify'` */ bandAlignment?: AgBandAlignment; /** * Set to `true` to prevent bars with `null`, `undefined` or missing values from taking up space in each category. * * Default: `false` */ skipNullBars?: boolean; } type AgGroupedCategoryAxisTickOptions = Omit; export interface AgGroupedCategoryAxisOptions extends Omit, AgBaseCrosshairLabel, TContext>, 'tick'> { type?: 'grouped-category'; /** The size of the gap between the categories as a proportion, between 0 and 1. This value is a fraction of the “step”, which is the interval between the start of a band and the start of the next band. */ paddingInner?: Ratio; /** This property is for grouped column/bar series plotted on a category axis. It is a proportion between 0 and 1 which determines the size of the gap between the bars or columns within a single group along the axis. */ groupPaddingInner?: Ratio; /** An array of depth options, starting from the leafs. */ depthOptions?: AgGroupedCategoryDepthOptions[]; /** Configuration for the axis ticks. */ tick?: AgGroupedCategoryAxisTickOptions; /** Configuration for the axis band highlight. */ bandHighlight?: AgBandHighlightOptions; /** * The maximum thickness of the axis, as a ratio of the chart's width or height depending on axis direction. * Used to prevent the axis from growing too large when labels or content are oversized. * * Default: `0.5` */ maxThicknessRatio?: Ratio; } export interface AgTimeAxisOptions extends Omit, AgCrosshairLabel, TContext>, 'interval'>, AgContinuousAxisOptions { type?: 'time'; /** Options for labels and ticks for the parent level intervals. */ parentLevel?: AgTimeAxisParentLevel; /** Add cross-lines or regions corresponding to data values. */ crossLines?: AgCartesianCrossLineOptions[]; } export interface AgUnitTimeAxisOptions extends Omit, AgCrosshairLabel, TContext>, 'interval'>, AgBaseContinuousAxisOptions { type?: 'unit-time'; /** Add cross-lines or regions corresponding to data values. */ crossLines?: AgCartesianCrossLineOptions[]; /** Options for labels and ticks for the parent level intervals. */ parentLevel?: AgTimeAxisParentLevel; /** The size of each band. A unit keyword (or number), or an object describing the interval. */ unit?: AgTimeInterval | AgTimeIntervalUnit; /** Configuration for the axis ticks interval. */ interval?: AgAxisDiscreteTimeIntervalOptions; /** The size of the gap between the categories as a proportion, between 0 and 1. This value is a fraction of the “step”, which is the interval between the start of a band and the start of the next band. */ paddingInner?: Ratio; /** The padding on the outside i.e. left and right of the first and last category. In association with `paddingInner`, this value can be between 0 and 1. */ paddingOuter?: Ratio; /** This property is for grouped column/bar series plotted on a category axis. It is a proportion between 0 and 1 which determines the size of the gap between the bars or columns within a single group along the axis. */ groupPaddingInner?: Ratio; /** Configuration for the axis band highlight. */ bandHighlight?: AgBandHighlightOptions; /** * The alignment of bands when used with bar-like series with fixed widths. * * Default: `'justify'` */ bandAlignment?: AgBandAlignment; /** * Set to `true` to prevent bars with `null`, `undefined` or missing values from taking up space in each category. * * Default: `false` */ skipNullBars?: boolean; } export interface AgOrdinalTimeAxisOptions extends AgBaseCartesianAxisOptions, AgCrosshairLabel, TContext> { type?: 'ordinal-time'; /** Add cross-lines or regions corresponding to data values. */ crossLines?: AgCartesianCrossLineOptions[]; /** Options for labels and ticks for the parent level intervals. */ parentLevel?: AgTimeAxisParentLevel; /** Configuration for the axis ticks interval. */ interval?: AgAxisDiscreteTimeIntervalOptions; /** The size of the gap between the categories as a proportion, between 0 and 1. This value is a fraction of the “step”, which is the interval between the start of a band and the start of the next band. */ paddingInner?: Ratio; /** The padding on the outside i.e. left and right of the first and last category. In association with `paddingInner`, this value can be between 0 and 1. */ paddingOuter?: Ratio; /** This property is for grouped column/bar series plotted on a category axis. It is a proportion between 0 and 1 which determines the size of the gap between the bars or columns within a single group along the axis. */ groupPaddingInner?: Ratio; /** Configuration for the axis band highlight. */ bandHighlight?: AgBandHighlightOptions; /** * The alignment of bands when used with bar-like series with fixed widths. * * Default: `'justify'` */ bandAlignment?: AgBandAlignment; /** * Set to `true` to prevent bars with `null`, `undefined` or missing values from taking up space in each category. * * Default: `false` */ skipNullBars?: boolean; } export interface AgNumberAxisOptions extends Omit, AgCrosshairLabel, TContext>, 'interval'>, AgContinuousAxisOptions { type?: 'number'; /** Add cross-lines or regions corresponding to data values. */ crossLines?: AgCartesianCrossLineOptions[]; } export interface AgLogAxisOptions extends Omit, AgCrosshairLabel, TContext>, 'interval'>, AgContinuousAxisOptions { type?: 'log'; /** The base of the logarithm used. */ base?: number; /** Add cross-lines or regions corresponding to data values. */ crossLines?: AgCartesianCrossLineOptions[]; } export type AgCartesianAxisPosition = 'top' | 'right' | 'bottom' | 'left'; export type AgCartesianAxisOptions = AgNumberAxisOptions | AgLogAxisOptions | AgCategoryAxisOptions | AgOrdinalTimeAxisOptions | AgTimeAxisOptions | AgUnitTimeAxisOptions | AgGroupedCategoryAxisOptions; export type AgCartesianAxisType = NonNullable['type']>; /** This is the configuration shared by all types of axis. */ export interface AgCartesianAxisThemeOptions { /** An object with axis theme overrides for the `top` positioned axes. Same configs apply here as one level above. For example, to rotate labels by 45 degrees in 'top' positioned axes one can use `top: { label: { rotation: 45 } } }`. */ top?: Omit; /** An object with axis theme overrides for the `right` positioned axes. Same configs apply here as one level above. */ right?: Omit; /** An object with axis theme overrides for the `bottom` positioned axes. Same configs apply here as one level above. */ bottom?: Omit; /** An object with axis theme overrides for the `left` positioned axes. Same configs apply here as one level above. */ left?: Omit; } export interface AgBaseCartesianThemeOptions extends AgBaseThemeableChartOptions { /** Axis configurations. */ axes?: AgCartesianAxesTheme; /** Configuration relating to the series area. */ seriesArea?: AgCartesianSeriesAreaThemableOptions; /** A map of event names to event listeners. */ listeners?: AgAxesChartListeners; } export interface AgCartesianSeriesAreaThemableOptions extends AgSeriesAreaOptions { /** Styles applied to every Background Region. */ backgroundRegions?: AgSeriesAreaBackgroundRegion; } export interface AgCartesianSeriesAreaOptions extends AgSeriesAreaOptions { /** Rectangular regions filled behind the series, each bounded by value ranges on an x-axis and a y-axis. */ backgroundRegions?: AgSeriesAreaBackgroundRegion[]; } export interface AgCartesianAxesCrossLineThemeOptions { /** Theme configuration for Cross Lines. */ crossLines?: AgCrossLineThemeOptions; } export interface AgCartesianAxesTheme { /** This extends the common axis configuration with options specific to number axes. */ number?: AgNumberAxisThemeOptions; /** This extends the common axis configuration with options specific to number axes. */ log?: AgLogAxisThemeOptions; /** This extends the common axis configuration with options specific to category axes. */ category?: AgCategoryAxisThemeOptions; /** This extends the common axis configuration with options specific to time axes. */ time?: AgContinuousTimeAxisThemeOptions; /** This extends the common axis configuration with options specific to ordinal-time axes. */ 'ordinal-time'?: AgOrdinalTimeAxisThemeOptions; /** This extends the common axis configuration with options specific to grouped-category axes. */ 'grouped-category'?: AgGroupedCategoryAxisThemeOptions; /** This extends the common axis configuration with options specific to unit-time axes. */ 'unit-time'?: AgUnitTimeAxisThemeOptions; } export type AgContinuousCartesianAxesTheme = Pick, 'number' | 'log' | 'time'>; type ThemeOmittedAxisOptions = 'type' | 'crossLines'; export interface AgNumberAxisThemeOptions extends Omit, ThemeOmittedAxisOptions>, AgCartesianAxisThemeOptions>, AgCartesianAxesCrossLineThemeOptions { } export interface AgLogAxisThemeOptions extends Omit, ThemeOmittedAxisOptions>, AgCartesianAxisThemeOptions>, AgCartesianAxesCrossLineThemeOptions { } export interface AgCategoryAxisThemeOptions extends Omit, ThemeOmittedAxisOptions>, AgCartesianAxisThemeOptions>, AgCartesianAxesCrossLineThemeOptions { } export interface AgOrdinalTimeAxisThemeOptions extends Omit, ThemeOmittedAxisOptions>, AgCartesianAxisThemeOptions>, AgCartesianAxesCrossLineThemeOptions { } export interface AgGroupedCategoryAxisThemeOptions extends Omit, ThemeOmittedAxisOptions>, AgCartesianAxisThemeOptions>, AgCartesianAxesCrossLineThemeOptions { } export interface AgContinuousTimeAxisThemeOptions extends Omit, ThemeOmittedAxisOptions>, AgCartesianAxisThemeOptions>, AgCartesianAxesCrossLineThemeOptions { } export interface AgUnitTimeAxisThemeOptions extends Omit, ThemeOmittedAxisOptions>, AgCartesianAxisThemeOptions>, AgCartesianAxesCrossLineThemeOptions { } /** * Where a Cross Line label sits. The first token names the edge the label sits against, outside a range's band * unless prefixed with `inside`; the second positions it along that edge. `start` and `end` follow the chart's * text direction. Which values apply depends on the Cross Line type and its axis: * * - On a y-axis line: `top`, `top-left`, `top-right`, `bottom`, `bottom-left`, `bottom-right`, `left`, `right`, * `inside`, `inside-left`, `inside-right`, and their `start`/`end` twins. * - On an x-axis line: `top`, `bottom`, `left`, `left-top`, `left-bottom`, `right`, `right-top`, `right-bottom`, * `inside`, `inside-top`, `inside-bottom`, and their `start`/`end` twins. `inside-start` and `inside-end` are the * same as `inside-top` and `inside-bottom`, whatever the text direction. * - On a range: every value. */ export type AgCartesianCrossLineLabelPlacement = 'top' | 'bottom' | 'left' | 'right' | 'start' | 'end' | 'top-left' | 'top-right' | 'top-start' | 'top-end' | 'bottom-left' | 'bottom-right' | 'bottom-start' | 'bottom-end' | 'left-top' | 'left-bottom' | 'right-top' | 'right-bottom' | 'start-top' | 'start-bottom' | 'end-top' | 'end-bottom' | 'inside' | 'inside-top' | 'inside-bottom' | 'inside-left' | 'inside-right' | 'inside-start' | 'inside-end' | 'inside-top-left' | 'inside-top-right' | 'inside-top-start' | 'inside-top-end' | 'inside-bottom-left' | 'inside-bottom-right' | 'inside-bottom-start' | 'inside-bottom-end'; /** A Cartesian axis Cross Line rendered as a single line at `value`. The label supports `placement` and `rotation`. */ export interface AgCartesianLineCrossLineOptions extends AgLineCrossLineOptions { } /** A Cartesian axis Cross Line rendered as a shaded band spanning `range`. The label supports `placement` and `rotation`. */ export interface AgCartesianRangeCrossLineOptions extends AgRangeCrossLineOptions { } export type AgCartesianCrossLineOptions = AgCartesianLineCrossLineOptions | AgCartesianRangeCrossLineOptions; export interface AgCartesianCrossLineLabelOptions extends AgBaseCrossLineLabelOptions, AgChartLabelFitOptions, AgChartLabelAutoFontSizeOptions { /** * The position of the Cross Line label. * * @deprecated v14.3.0 Use `placement` instead. */ position?: AgCrossLineLabelPosition; /** * Where to place the label. An array is tried in order, and the first placement that fits is used. * * Default: `'top'` */ placement?: AgCartesianCrossLineLabelPlacement | AgCartesianCrossLineLabelPlacement[]; /** The rotation of the Cross Line label in degrees. */ rotation?: Degree; /** Configuration for how the Cross Line label behaves when it collides with other chart elements. */ collision?: AgChartLabelCollisionOptions; } export interface AgSeriesAreaBackgroundRegion extends FillOptions, StrokeOptions { /** The bounds of the region on an x-axis. Omit to span the full width of the series area. */ xRange?: AgSeriesAreaBackgroundRegionRange; /** The bounds of the region on a y-axis. Omit to span the full height of the series area. */ yRange?: AgSeriesAreaBackgroundRegionRange; /** Configuration for the label displayed with the region. */ label?: AgSeriesAreaBackgroundRegionLabel; } export interface AgSeriesAreaBackgroundRegionRange { /** The key of the axis in the `axes` dictionary that this range applies to. */ axis?: string; /** The axis value where the region starts. Omit to extend the region to the edge of the series area. */ start?: AxisValue; /** The axis value where the region ends. Omit to extend the region to the edge of the series area. */ end?: AxisValue; } export interface AgSeriesAreaBackgroundRegionLabel extends Omit, AgChartLabelFitOptions, AgChartLabelAutoFontSizeOptions { /** The font family to use for the label. A single family name, or an array of names used as fallbacks. */ fontFamily?: FontFamilyFull; /** The position of the Background Region label. */ position?: AgSeriesAreaBackgroundRegionLabelPosition; /** The rotation of the Background Region label in degrees. */ rotation?: Degree; /** The text to show in the label. */ text?: string; /** The horizontal offset in pixels for the label. * * Default: `0` */ xOffset?: PixelSize; /** The vertical offset in pixels for the label. * * Default: `0` */ yOffset?: PixelSize; } /** The position of a background region's label. * * For a position outside the region, the first token is the side of the region the label sits on and * the second is its alignment along that side — the same twelve names, with the same meaning, as * `legend.placement`. An `inside` corner label is flush to both named edges, so token order carries no * information there. */ export type AgSeriesAreaBackgroundRegionLabelPosition = 'top' | 'left' | 'right' | 'bottom' | 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' | 'inside' | 'inside-left' | 'inside-right' | 'inside-top' | 'inside-bottom' | 'inside-top-left' | 'inside-bottom-left' | 'inside-top-right' | 'inside-bottom-right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; export {};