ag-charts-enterprise
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
125 lines (124 loc) • 5.17 kB
TypeScript
import { type AgActiveItemState, type AgRadialGaugeOptions, type TextAlign, type VerticalAlign, _ModuleSupport } from 'ag-charts-community';
import { type ChartAnimationPhase, type DynamicContext, type NormalisedTextOrSegments, type Point } from 'ag-charts-core';
import type { AgNumericValue } from 'ag-charts-types';
import { LinearAngleScale } from '../../axes/angle-number/linearAngleScale';
import { DatumUnion } from '../gauge-util/datumUnion';
import { type RadialGaugeLabelDatum, type RadialGaugeNodeDatum, RadialGaugeSeriesProperties, type RadialGaugeTargetDatum } from './radialGaugeSeriesProperties';
type SeriesNodeDatum = _ModuleSupport.SeriesNodeDatum;
interface RadialGaugeNeedleDatum {
centerX: number;
centerY: number;
radius: number;
angle: number;
series: RadialGaugeSeries;
}
interface RadialGaugeTickDatum {
index: number;
value: AgNumericValue;
text: NormalisedTextOrSegments;
}
interface RadialGaugeNodeDataContext extends _ModuleSupport.SeriesNodeDataContext<RadialGaugeNodeDatum, RadialGaugeLabelDatum> {
needleData: RadialGaugeNeedleDatum[];
targetData: RadialGaugeTargetDatum[];
scaleData: RadialGaugeNodeDatum[];
tickData: RadialGaugeTickDatum[];
}
export declare class RadialGaugeSeries extends _ModuleSupport.Series<RadialGaugeNodeDatum, AgRadialGaugeOptions, RadialGaugeSeriesProperties, RadialGaugeLabelDatum, RadialGaugeNodeDataContext> implements _ModuleSupport.GaugeSeries {
static readonly className = "RadialGaugeSeries";
static readonly type: "radial-gauge";
centerX: number;
centerY: number;
radius: number;
textAlign: TextAlign;
verticalAlign: VerticalAlign;
properties: RadialGaugeSeriesProperties;
scale: LinearAngleScale;
private readonly scaleGroup;
private readonly itemGroup;
private readonly itemNeedleGroup;
private readonly itemTargetGroup;
private readonly itemTargetLabelGroup;
private readonly itemLabelGroup;
private readonly highlightTargetGroup;
private readonly tickGroup;
private scaleSelection;
private datumSelection;
private needleSelection;
targetSelection: _ModuleSupport.Selection<any, _ModuleSupport.Marker<RadialGaugeTargetDatum>>;
private targetLabelSelection;
private labelSelection;
private highlightTargetSelection;
private tickSelection;
datumUnion: DatumUnion<_ModuleSupport.Sector<RadialGaugeNodeDatum>>;
private readonly animationState;
contextNodeData?: RadialGaugeNodeDataContext;
constructor(moduleCtx: DynamicContext<_ModuleSupport.ChartRegistry>);
get hasData(): boolean;
private nodeFactory;
private markerFactory;
processData(): void;
private formatLabel;
private layoutScale;
protected getShapeFillBBox(): _ModuleSupport.ShapeFillBBox;
private getTargets;
private getTargetRadius;
private getTargetLabel;
createNodeData(): {
itemId: string;
nodeData: RadialGaugeNodeDatum[];
needleData: RadialGaugeNeedleDatum[];
targetData: RadialGaugeTargetDatum[];
labelData: RadialGaugeLabelDatum[];
scaleData: RadialGaugeNodeDatum[];
tickData: RadialGaugeTickDatum[];
};
findNodeDatum(itemId: AgActiveItemState['itemId']): SeriesNodeDatum | undefined;
updateSelections(resize: boolean): void;
private highlightDatum;
update({ seriesRect }: {
seriesRect?: _ModuleSupport.BBox;
}): void;
private updateDatumSelection;
private updateDatumNodes;
private updateScaleSelection;
private updateScaleNodes;
private updateNeedleSelection;
private updateNeedleNodes;
private updateTargetSelection;
private updateTargetStyles;
private updateTargetNodes;
private getTargetStyle;
private updateTargetLabelSelection;
private updateTargetLabelNodes;
private updateLabelSelection;
private updateLabelNodes;
private updateTickSelection;
private updateTickNodes;
private getTickLabelAlign;
private getTickLabelInset;
labelsHaveExplicitText(): boolean;
formatLabelText(datum?: {
label: AgNumericValue | undefined;
secondaryLabel: AgNumericValue | undefined;
}): void;
protected resetAllAnimation(): void;
resetAnimation(phase: ChartAnimationPhase): void;
private animateLabelText;
animateEmptyUpdateReady(): void;
animateWaitingUpdateReady(): void;
protected animateReadyResize(): void;
dataCount(): number;
getSeriesDomain(): {
domain: number[];
};
getSeriesRange(): [number, number];
getLegendData(): _ModuleSupport.ChartLegendDatum<any>[];
getTooltipContent(datumIndex: _ModuleSupport.DatumIndex): _ModuleSupport.TooltipContent | undefined;
pickNodeClosestDatum(point: Point): _ModuleSupport.SeriesNodePickMatch | undefined;
pickFocus(opts: _ModuleSupport.PickFocusInputs): _ModuleSupport.PickFocusOutputs | undefined;
getCaptionText(): string;
getCategoryValue(_datumIndex: _ModuleSupport.DatumIndex): void;
datumIndexForCategoryValue(_categoryValue: any): _ModuleSupport.DatumIndex | undefined;
protected hasItemStylers(): boolean;
}
export {};