ag-charts-enterprise
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
52 lines (51 loc) • 2.34 kB
TypeScript
import { type TextOrSegments, _ModuleSupport } from 'ag-charts-community';
import { type DynamicContext, type NormalisedGradientLegendIntervalOptions, type NormalisedGradientLegendLabelOptions } from 'ag-charts-core';
import type { AgChartLegendPlacement } from 'ag-charts-types';
interface TickDatum {
tick: any;
tickId: string;
tickLabel: TextOrSegments;
translation: number;
}
export declare class AxisTicks {
private readonly ctx;
static readonly className = "AxisTicks";
static readonly DefaultTickCount = 5;
static readonly DefaultMinSpacing = 10;
readonly id: string;
protected readonly axisGroup: _ModuleSupport.TranslatableGroup<unknown>;
protected readonly labelSelection: _ModuleSupport.Selection<TickDatum, _ModuleSupport.Text<TickDatum>>;
readonly scale: _ModuleSupport.LinearScale;
readonly formatterCache: _ModuleSupport.AxisLabelFormatterCache;
/** Owned by the gradient legend; assigned via `applyOptions` before any layout call. */
labelOptions: NormalisedGradientLegendLabelOptions | undefined;
intervalOptions: NormalisedGradientLegendIntervalOptions | undefined;
namedLabels?: _ModuleSupport.GradientLegendNamedLabel[];
placement: AgChartLegendPlacement;
translationX: number;
translationY: number;
/** Internal layout state derived from `placement`. Not user-facing — see I2. */
mirrored: boolean;
parallel: boolean;
/** Bound series for formatter context — scoped to a single gradient legend item. */
boundSeries: Array<{
seriesId: string;
key: string;
name?: string;
}>;
constructor(ctx: DynamicContext<_ModuleSupport.ChartRegistry>);
private get horizontal();
attachAxis(axisNode: _ModuleSupport.Group): void;
detach(): void;
/** Shift the already-laid-out axis group by an additional offset. */
applyOffset(dx: number, dy: number): void;
calculateLayout(): _ModuleSupport.BBox | undefined;
tickFormatter(domain: number[], _ticks: number[], _primary: boolean, fractionDigits?: number): (value: any, index: number) => TextOrSegments | undefined;
inRange(x: number, tolerance?: number): boolean;
padding: number;
private generateTicks;
private generateNamedTicks;
private applyCollisionAvoidance;
private getTicksData;
}
export {};