ag-charts-community
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
40 lines (39 loc) • 1.81 kB
TypeScript
import { BaseProperties, type RequireOptional } from 'ag-charts-core';
import type { AgChartLabelFormatterParams, AgChartLabelOptions, AgChartLabelStyleOptions, AgChartLabelStylerParams, ContextDefault, FontStyle, FontWeight, Padding, PaddingOptions, RichFormatter, Styler } from 'ag-charts-types';
import type { ContextFormatter } from '../module/axisContext';
export declare class LabelBorder {
enabled: boolean;
stroke?: string;
strokeWidth?: number;
strokeOpacity?: number;
}
export declare class LabelStyle extends BaseProperties implements AgChartLabelStyleOptions {
border: LabelBorder;
color?: string;
cornerRadius?: number;
fill?: string;
fillOpacity?: number;
fontStyle?: FontStyle;
fontWeight?: FontWeight;
fontSize: number;
fontFamily: string;
padding?: Padding;
}
export declare class Label<TParams = never, TDatum = any> extends LabelStyle implements AgChartLabelOptions<TDatum, RequireOptional<TParams>> {
enabled: boolean;
formatter?: RichFormatter<AgChartLabelFormatterParams<TDatum> & RequireOptional<TParams>>;
format?: string;
itemStyler?: Styler<AgChartLabelStylerParams<TDatum, ContextDefault>, AgChartLabelStyleOptions>;
private _cachedFormatter;
formatValue(formatWithContext: ContextFormatter<AgChartLabelFormatterParams<TDatum> & RequireOptional<TParams>>, type: 'number' | 'date' | 'category', value: any, params: AgChartLabelFormatterParams<TDatum> & RequireOptional<TParams>): string | import("ag-charts-types").TextSegment[] | undefined;
}
type LabelBoxingMixin = {
border?: {
enabled?: boolean;
stroke?: string;
};
fill?: unknown;
padding?: Padding;
};
export declare function expandLabelPadding(label: LabelBoxingMixin | undefined): Required<PaddingOptions>;
export {};