Files
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

39 lines
873 B
TypeScript

export type ChartsTextBaseline = 'hanging' | 'central' | 'auto' | 'text-after-edge' | 'text-before-edge';
export type ChartsTextAnchor = 'start' | 'middle' | 'end';
export interface ChartsTextStyle extends React.CSSProperties {
angle?: number;
/**
* The text baseline
* @default 'central'
*/
dominantBaseline?: ChartsTextBaseline;
/**
* The text anchor
* @default 'middle'
*/
textAnchor?: ChartsTextAnchor;
}
export interface GetWordsByLinesParams {
/**
* Text displayed.
*/
text: string;
/**
* Style applied to text elements.
*/
style?: ChartsTextStyle;
/**
* If `true`, the line width is computed.
* @default false
*/
needsComputation?: boolean;
}
export declare function getWordsByLines({
style,
needsComputation,
text
}: GetWordsByLinesParams): {
width: number;
height: number;
text: string;
}[];