UNPKG

@antv/g2plot

Version:

G2 Plot, a market of plots built with the Grammar of Graphics'

23 lines (22 loc) 467 B
/** * 判断text是否可用, title description * * @param source */ export declare function isTextUsable(source?: { visible?: boolean; text?: string; }): boolean; /** * 为字符串添加换行符 * @param source - 字符串数组 ['a', 'b', 'c'] * @param breaks - 要添加换行的index * * @example * ```js * breakText(['a','b','c'], [1]) * * // a\nbc * ``` */ export declare function breakText(source: string[], breaks: number[]): string;