ag-charts-enterprise
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
126 lines (125 loc) • 7.31 kB
TypeScript
import { type AgBaseRadarSeriesOptions, type AgDrawingMode, type AgRadarSeriesStyle, type AgSeriesMarkerStyle, type ContextDefault, type CssColor, type DatumDefault, type SelectionState, _ModuleSupport } from 'ag-charts-community';
import { type CallbackParam, ChartAxisDirection, type DomainWithMetadata, type DynamicContext, type NormalisedSeriesMarkerStyle, type Point } from 'ag-charts-core';
import { type RadarNodeDatum, RadarSeriesProperties } from './radarSeriesProperties';
export interface RadarPathPoint {
x: number;
y: number;
moveTo: boolean;
radius?: number;
startAngle?: number;
endAngle?: number;
arc?: boolean;
}
interface RadarSeriesNodeDataContext extends _ModuleSupport.SeriesNodeDataContext<RadarNodeDatum> {
styles: _ModuleSupport.SeriesNodeStyleContext<NormalisedSeriesMarkerStyle>;
}
type StylerResult<TStyle extends AgRadarSeriesStyle> = Omit<TStyle, 'stroke' | 'marker'> & {
stroke?: CssColor;
marker?: NormalisedSeriesMarkerStyle & {
enabled?: boolean;
};
};
type BaseRadarSeries = RadarSeries<AgRadarSeriesStyle, AgBaseRadarSeriesOptions<DatumDefault, ContextDefault, AgRadarSeriesStyle>, RadarSeriesProperties<AgRadarSeriesStyle, AgBaseRadarSeriesOptions<DatumDefault, ContextDefault, AgRadarSeriesStyle>>>;
export type ResolvedRadarStyle<TStyle extends AgRadarSeriesStyle> = {
[K in keyof TStyle]-?: K extends 'stroke' ? CssColor : Exclude<TStyle[K], undefined>;
} & {
marker: Required<NormalisedSeriesMarkerStyle> & {
enabled: boolean;
};
};
declare class RadarSeriesNodeEvent<TEvent extends string = _ModuleSupport.SeriesNodeEventTypes> extends _ModuleSupport.SeriesNodeEvent<RadarNodeDatum, TEvent> {
readonly angleKey?: string;
readonly radiusKey?: string;
constructor(type: TEvent, nativeEvent: Event, datum: RadarNodeDatum, series: BaseRadarSeries, selectionState: SelectionState | undefined);
}
export declare abstract class RadarSeries<TStyle extends AgRadarSeriesStyle, TOpts extends AgBaseRadarSeriesOptions<DatumDefault, ContextDefault, TStyle>, TProps extends RadarSeriesProperties<TStyle, TOpts>> extends _ModuleSupport.PolarSeries<RadarNodeDatum, TOpts, TProps, _ModuleSupport.Marker<RadarNodeDatum>> {
static readonly className: string;
protected readonly NodeEvent: typeof RadarSeriesNodeEvent;
private readonly lineGroup;
protected lineSelection: _ModuleSupport.Selection<boolean, _ModuleSupport.Path<boolean>>;
protected resetInvalidToZero: boolean;
private hideWithSize0;
contextNodeData?: RadarSeriesNodeDataContext;
constructor(moduleCtx: DynamicContext<_ModuleSupport.ChartRegistry>);
renderToOffscreenCanvas(): boolean;
protected nodeFactory(): _ModuleSupport.Marker<RadarNodeDatum>;
getSeriesDomain(direction: ChartAxisDirection): DomainWithMetadata<any>;
processData(dataController: _ModuleSupport.DataController): Promise<void>;
protected circleCache: {
r: number;
cx: number;
cy: number;
};
protected didCircleChange(): boolean;
protected getAxisInnerRadius(): number;
maybeRefreshNodeData(): void;
createNodeData(): {
itemId: string;
nodeData: RadarNodeDatum[];
labelData: RadarNodeDatum[];
styles: Record<_ModuleSupport.HighlightState, NormalisedSeriesMarkerStyle>;
} | undefined;
update({ seriesRect }: {
seriesRect?: _ModuleSupport.BBox;
}): void;
protected updatePathSelections(): void;
protected updateMarkerSelection(): void;
protected updateHighlightSelection(): void;
protected getMarkerFill(highlightedStyle?: _ModuleSupport.SeriesItemHighlightStyle): string | import("ag-charts-core").InternalAgGradientColor | import("ag-charts-core").InternalAgPatternColor | import("ag-charts-core").InternalAgImageFill;
protected getDatumStylerProperties(datum: any): {
seriesId: string;
datum: any;
angleKey: string;
radiusKey: string;
};
private static readonly computeNoStylerMarkerStyle;
private static readonly computeStylerStyle;
private static readonly applyStylerDatum;
protected updateDatumStyles(selection: _ModuleSupport.Selection<RadarNodeDatum, _ModuleSupport.Marker<RadarNodeDatum>>, isHighlight: boolean): void;
protected updateMarkers(selection: _ModuleSupport.Selection<RadarNodeDatum, _ModuleSupport.Marker<RadarNodeDatum>>, isHighlight: boolean, drawingMode: AgDrawingMode): void;
protected updateLabels(): void;
getTooltipContent(datumIndex: number): _ModuleSupport.TooltipContent | undefined;
private legendItemSymbol;
getLegendData(legendType: _ModuleSupport.ChartLegendType): _ModuleSupport.CategoryLegendDatum[];
protected pickNodeClosestDatum(hitPoint: Point): _ModuleSupport.SeriesNodePickMatch | undefined;
computeLabelsBBox(): _ModuleSupport.BBox | null;
protected getLineNode(): _ModuleSupport.Path<boolean> | undefined;
protected beforePathAnimation(): void;
protected getPathNodesStyle(): import("ag-charts-core").Intersection<Exclude<ResolvedRadarStyle<TStyle>, false | null | undefined> | Exclude<Partial<TOpts & {
fill: import("ag-charts-core").NormalisedColorType;
fillOpacity: number;
stroke: string;
strokeWidth: number;
strokeOpacity: number;
lineDash: number[];
lineDashOffset: number;
opacity: number;
}>, false | null | undefined> | Exclude<Partial<TOpts & {
fill: import("ag-charts-core").NormalisedColorType;
fillOpacity: number;
stroke: string;
strokeWidth: number;
strokeOpacity: number;
lineDash: number[];
lineDashOffset: number;
opacity: number;
}>, false | null | undefined>>;
protected abstract updatePathNodes(): void;
protected getLinePoints(): RadarPathPoint[];
protected animateSinglePath(pathNode: _ModuleSupport.Path, points: RadarPathPoint[], ratio: number): void;
protected animatePaths(ratio: number): void;
animateEmptyUpdateReady(): void;
animateWaitingUpdateReady(data: _ModuleSupport.PolarAnimationData): void;
animateReadyResize(data: _ModuleSupport.PolarAnimationData): void;
protected resetPaths(): ResolvedRadarStyle<TStyle> | undefined;
protected abstract makeStylerParams(highlightStateEnum: _ModuleSupport.HighlightState | undefined, selectionStateEnum: _ModuleSupport.SelectionState | undefined, candidateStateEnum: _ModuleSupport.SelectionState | undefined): CallbackParam<NonNullable<TOpts['styler']>>;
protected getStylerResult(stylerResult: StylerResult<TStyle>, highlightState: _ModuleSupport.HighlightState | undefined, selectionState: _ModuleSupport.SelectionState | undefined, candidateState: _ModuleSupport.SelectionState | undefined): StylerResult<TStyle>;
abstract getStyle(highlightState: _ModuleSupport.HighlightState | undefined): ResolvedRadarStyle<TStyle>;
getFormattedMarkerStyle(datum: RadarNodeDatum): Omit<AgSeriesMarkerStyle, keyof import("ag-charts-core").FillStrokeMorph> & import("ag-charts-core").FillStrokeMorph & {
size: number;
opacity?: number;
};
protected computeFocusBounds(opts: _ModuleSupport.PickFocusInputs): _ModuleSupport.BBox | undefined;
protected hasItemStylers(): boolean;
}
export {};