Skip to content

TextFormatter

Type class

Splits text into chunks of plain text and style blocks, such as [bold], and reads style blocks into text styles.

Sources

TextFormatter can be used (imported) via one of the following packages.

// Import TextFormatter
import * as am5 from "@amcharts/amcharts5";
// Create TextFormatter
am5.TextFormatter.new(root, {
// ... config if applicable
});

Inheritance

TextFormatter does not extend any other symbol.

TextFormatter is not extended by any other symbol.

Properties

prefix

StaticType stringDefault "__amcharts__"

Methods

getTextStyle(style: string)

StaticReturns ITextStyle

Reads a style block, such as [bold #f00 fontSize: 20px], into text style settings: a font weight, underline or line-through, a color, and any key: value pairs.

Events

TextFormatter does not have any events.