import type { ITextGraphicAttribute, TextAlignType, TextBaselineType, ICartesianSeries, IGroupGraphicAttribute, ILineGraphicAttribute } from '@visactor/vchart'; export type SeriesLabelData = { point: { x: number; y: number; }; label: string; color: string; textAlign: TextAlignType; textBaseline: TextBaselineType; series: ICartesianSeries; datum: any; id: string; position: string; }; export interface SeriesLabelAttrs extends IGroupGraphicAttribute { line?: { visible?: boolean; autoVisible?: boolean; style?: ILineGraphicAttribute; }; label?: { formatMethod?: (text: string, datum: any, context: any) => string; style?: ITextGraphicAttribute; space?: number; styleMap?: { [key: string]: { visible?: boolean; style?: ITextGraphicAttribute; formatMethod?: (text: string, datum: any, context: any) => string; }; }; }; data: SeriesLabelData[]; layout: 'horizontal' | 'vertical'; position: 'start' | 'end' | 'both-ends'; } export interface SeriesLabelSpec extends Partial> { visible?: boolean; }