@visactor/vrender-components
Version:
components library for dp visualization
25 lines (24 loc) • 802 B
TypeScript
import type { IGroupGraphicAttribute, ITextGraphicAttribute } from '@visactor/vrender-core';
import type { TextContent } from '../core/type';
export interface IndicatorAttributes extends IGroupGraphicAttribute {
visible?: boolean;
size: {
width: number;
height: number;
};
dx?: number;
dy?: number;
limitRatio?: number;
title?: IndicatorItemSpec;
content?: IndicatorItemSpec[] | IndicatorItemSpec;
}
export interface IndicatorItemSpec {
visible?: boolean;
space?: number;
autoLimit?: boolean;
autoFit?: boolean;
fitPercent?: number;
fitStrategy?: 'default' | 'inscribed';
formatMethod?: (text: string | number, textStyle: ITextGraphicAttribute) => TextContent;
style?: Omit<ITextGraphicAttribute, 'text'> & TextContent;
}