UNPKG

ag-charts-types

Version:

Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue

60 lines (59 loc) 3.96 kB
import type { AgDropShadowOptions } from '../../chart/dropShadowOptions'; import type { AgChartLabelOptions } from '../../chart/labelOptions'; import type { AgSeriesTooltip } from '../../chart/tooltipOptions'; import type { PixelSize } from '../../chart/types'; import type { AgInterpolationType } from '../interpolationOptions'; import type { AgSeriesMarkerOptions, AgSeriesMarkerStyle } from '../markerOptions'; import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions, AgSeriesHighlightStyle } from '../seriesOptions'; import type { AgCartesianSeriesTooltipRendererParams } from './cartesianSeriesTooltipOptions'; import type { FillOptions, LineDashOptions, StrokeOptions } from './commonOptions'; export interface AgRangeAreaSeriesTooltipRendererParams extends Omit<AgCartesianSeriesTooltipRendererParams, 'xKey' | 'xName' | 'yKey' | 'yName'>, AgRangeAreaSeriesOptionsKeys, AgRangeAreaSeriesOptionsNames, Omit<AgSeriesMarkerStyle, 'shape'> { /** Hovered marker */ itemId: 'up' | 'down' | 'unknown'; } export interface AgRangeAreaSeriesLabelOptions<TDatum, TParams> extends AgChartLabelOptions<TDatum, TParams> { /** Padding in pixels between the label and the edge of the marker. */ padding?: PixelSize; /** Where to render series labels relative to the area. */ placement?: AgRangeAreaSeriesLabelPlacement; } export type AgRangeAreaSeriesLabelPlacement = 'inside' | 'outside'; export type AgRangeAreaSeriesLabelFormatterParams = AgRangeAreaSeriesOptionsKeys & AgRangeAreaSeriesOptionsNames; export interface AgRangeAreaSeriesThemeableOptions<TDatum = any> extends StrokeOptions, FillOptions, LineDashOptions, AgBaseCartesianThemeableOptions<TDatum> { /** Configuration for the markers used in the series. */ marker?: AgSeriesMarkerOptions<TDatum, AgRangeAreaSeriesOptionsKeys>; /** Configuration for the line used in the series. */ interpolation?: AgInterpolationType; /** Configuration for the range series items when they are hovered over. */ highlightStyle?: AgSeriesHighlightStyle; /** Configuration for the labels shown on top of data points. */ label?: AgRangeAreaSeriesLabelOptions<TDatum, AgRangeAreaSeriesLabelFormatterParams>; /** Configuration for the shadow used behind the series items. */ shadow?: AgDropShadowOptions; /** Series-specific tooltip configuration. */ tooltip?: AgSeriesTooltip<AgRangeAreaSeriesTooltipRendererParams>; } export interface AgRangeAreaSeriesOptionsKeys { /** The key to use to retrieve x-values from the data. */ xKey: string; /** The key to use to retrieve y-low-values from the data. */ yLowKey: string; /** The key to use to retrieve y-high-values from the data. */ yHighKey: string; } export interface AgRangeAreaSeriesOptionsNames { /** 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-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; /** 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; } export interface AgRangeAreaSeriesOptions<TDatum = any> extends AgBaseSeriesOptions<TDatum>, AgRangeAreaSeriesOptionsKeys, AgRangeAreaSeriesOptionsNames, AgRangeAreaSeriesThemeableOptions<TDatum> { /** Configuration for the Range Area Series. */ type: 'range-area'; /** Set to `true` to connect across missing data points. */ connectMissingData?: boolean; }